Am 28/06/2022 um 17:26 schrieb Vladimir Sementsov-Ogievskiy: > On 6/28/22 18:22, Vladimir Sementsov-Ogievskiy wrote: >> On 6/28/22 16:04, Emanuele Giuseppe Esposito wrote: >>>>> Ok so far I did the following: >>>>> >>>>> - duplicated each public function as static {function}_locked() >>>> They shouldn't be duplicates: function without _locked suffix should >>>> take the mutex. >>> By "duplicate" I mean same function name, with just _locked suffix. >>> Maybe a better definition? >>> >>> Almost done preparing the patches! >> >> Why not just add _locked version and rework the version without suffix >> to call _locked under mutex one in one patch, to just keep it all >> meaningful? >> > > I mean, instead of: > > patch 1: add a _locked() duplicate > > At this point we have a duplicated function that's just bad practice. > > patch 2: remake version without prefix to call _locked() under mutex > > Now everything is correct. But we have to track the moment when > something strange becomes something correct. > > > do just > > patch 1: rename function to _locked() and add a wrapper without suffix, > that calls _locked() under mutex > > That's what I always intended to do. As I said, I just used the wrong word. Emanuele
- Re: [PATCH v7 10/18... Emanuele Giuseppe Esposito
- Re: [PATCH v7 10/18... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v7 10/18... Kevin Wolf
- Re: [PATCH v7 10/18... Paolo Bonzini
- Re: [PATCH v7 10/18... Emanuele Giuseppe Esposito
- Re: [PATCH v7 10/18] jobs: r... Emanuele Giuseppe Esposito
- Re: [PATCH v7 10/18] jo... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v7 10/18... Emanuele Giuseppe Esposito
- Re: [PATCH v7 10/18... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v7 10/18... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v7 10/18... Emanuele Giuseppe Esposito
- Re: [PATCH v7 10/18... Vladimir Sementsov-Ogievskiy
- [PATCH v7 07/18] jobs: add job lock in find_*... Emanuele Giuseppe Esposito
- [PATCH v7 01/18] job.c: make job_mutex and jo... Emanuele Giuseppe Esposito
- Re: [PATCH v7 01/18] job.c: make job_mut... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v7 01/18] job.c: make job_mut... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v7 01/18] job.c: make job... Emanuele Giuseppe Esposito
- Re: [PATCH v7 01/18] job.c: make... Vladimir Sementsov-Ogievskiy
- [PATCH v7 03/18] job.c: API functions not use... Emanuele Giuseppe Esposito
- Re: [PATCH v7 03/18] job.c: API function... Vladimir Sementsov-Ogievskiy
- [PATCH v7 16/18] jobs: protect job.aio_contex... Emanuele Giuseppe Esposito