Re: [PATCH v2 07/39] util/log: Rename qemu_log_lock to qemu_log_trylock

2022-04-12 Thread Alex Bennée
Richard Henderson writes: > This function can fail, which makes it more like ftrylockfile > or pthread_mutex_trylock than flockfile or pthread_mutex_lock, > so rename it. > > To closer match the other trylock functions, release rcu_read_lock > along the failure path, so that qemu_log_unlock nee

[PATCH v2 07/39] util/log: Rename qemu_log_lock to qemu_log_trylock

2022-03-26 Thread Richard Henderson
This function can fail, which makes it more like ftrylockfile or pthread_mutex_trylock than flockfile or pthread_mutex_lock, so rename it. To closer match the other trylock functions, release rcu_read_lock along the failure path, so that qemu_log_unlock need not be called on failure. Signed-off-b