On Mon, Mar 14, 2022 at 09:36:54AM -0400, Emanuele Giuseppe Esposito wrote: > In preparation to the job_lock/unlock usage, create _locked > duplicates of some functions, since they will be sometimes called with > job_mutex held (mostly within job.c), > and sometimes without (mostly from JobDrivers using the job API). > > Therefore create a _locked version of such function, so that it > can be used in both cases. > > List of functions duplicated as _locked: > job_is_ready (both versions are public) > job_is_completed (both versions are public) > job_is_cancelled (_locked version is public, needed by mirror.c) > job_pause_point (_locked version is static, purely done to simplify the code) > job_cancel_requested (_locked version is static) > > Note: at this stage, job_{lock/unlock} and job lock guard macros > are *nop*. > > Signed-off-by: Emanuele Giuseppe Esposito <eespo...@redhat.com> > --- > include/qemu/job.h | 25 +++++++++++++++++++++--- > job.c | 48 ++++++++++++++++++++++++++++++++++++++++------ > 2 files changed, 64 insertions(+), 9 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature