On Thu, Oct 05, 2023 at 09:49:25AM +0200, Juan Quintela wrote: > Peter Xu <pet...@redhat.com> wrote: > > It's just a simple wrapper for rp_sem on either wait() or kick(), make it > > even clearer on how it is used. Prepared to be used even for other things. > > > > Reviewed-by: Fabiano Rosas <faro...@suse.de> > > Signed-off-by: Peter Xu <pet...@redhat.com> > > Reviewed-by: Juan Quintela <quint...@redhat.com> > > I agree with the idea, but I think that the problem is the name of the > semaphore. > > > +void migration_rp_wait(MigrationState *s) > > +{ > > + qemu_sem_wait(&s->rp_state.rp_sem); > > I am not sure if it would be better to have the wrappers or just rename > > If we rename the remaphore to migration_thread, this becomes: > > qemu_sem_wait(&s->rp_state.return_path_ready); > > qemu_sem_post(&s->rp_state.return_path_ready); > > Or something similar?
I'd prefer keeping a pair of helpers, but I'm open to other suggestions, e.g. I can rename the sem at the same time, or have a better name just for the helpers. Thanks, -- Peter Xu