On Tue, Jul 05, 2022 at 10:07:40AM +0200, Emanuele Giuseppe Esposito wrote:
>
>
> Am 05/07/2022 um 09:39 schrieb Stefan Hajnoczi:
> > On Wed, Jun 29, 2022 at 10:15:23AM -0400, Emanuele Giuseppe Esposito wrote:
> >> +void job_ref(Job *job)
> >> +{
> >> +JOB_LOCK_GUARD();
> >> +job_ref_lock
In general looks good to me.
On 6/29/22 17:15, 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
Some static functi
Am 05/07/2022 um 09:39 schrieb Stefan Hajnoczi:
> On Wed, Jun 29, 2022 at 10:15:23AM -0400, Emanuele Giuseppe Esposito wrote:
>> +void job_ref(Job *job)
>> +{
>> +JOB_LOCK_GUARD();
>> +job_ref_locked(job);
>> +}
>
> You don't need to fix this, but just a note:
>
> This API seems danger
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 fun
On Wed, Jun 29, 2022 at 10:15:23AM -0400, Emanuele Giuseppe Esposito wrote:
> +void job_ref(Job *job)
> +{
> +JOB_LOCK_GUARD();
> +job_ref_locked(job);
> +}
You don't need to fix this, but just a note:
This API seems dangerous. If we don't hold the lock, how can we be sure
job won't be un