qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 05/20] job.c: add job_lock/unlock while keeping job.h inta


From: Stefan Hajnoczi
Subject: Re: [PATCH v8 05/20] job.c: add job_lock/unlock while keeping job.h intact
Date: Tue, 5 Jul 2022 08:39:55 +0100

On Wed, Jun 29, 2022 at 10:15:23AM -0400, Emanuele Giuseppe Esposito wrote:
> With "intact" we mean that all job.h functions implicitly
> take the lock. Therefore API callers are unmodified.
> 
> This means that:
> - all static functions become _locked, and call _locked functions
> - all public functions take the lock internally, and call _locked
>   functions
> - all public functions called internally by other functions in job.c will 
> have a
>   _locked counterpart, to avoid deadlocks (job lock already taken)
> - public functions called only from exernal files (not job.c) do not
>   have _locked() counterpart and take the lock inside
> 
> job_{lock/unlock} is independent from real_job_{lock/unlock}.
> 
> Note: at this stage, job_{lock/unlock} and job lock guard macros
> are *nop*
> 
> .Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
>  include/qemu/job.h |  73 +++++-
>  job.c              | 607 +++++++++++++++++++++++++++++++--------------
>  2 files changed, 499 insertions(+), 181 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]