loop: don't call the hooks around blocking wait

The hooks were previously used to unlock the loop but now that the
lock is handled inside the loop itself and we don't unlock before the
blocking read anymore, we should also not call the hooks.

The blocking invoke function is not meant to be called with any of the
loop context locks acquired in order to avoid a deadlock. Make this (and
other blocking risks) clear in the documentation.

See #4472
This commit is contained in:
Wim Taymans 2025-06-10 11:57:38 +02:00
parent feba1fd260
commit 8e32afb863
2 changed files with 5 additions and 6 deletions

View file

@ -478,14 +478,10 @@ again:
if (block && queue->ack_fd != -1) {
uint64_t count = 1;
spa_loop_control_hook_before(&impl->hooks_list);
if ((res = spa_system_eventfd_read(impl->system, queue->ack_fd, &count)) < 0)
spa_log_warn(impl->log, "%p: failed to read event fd:%d: %s",
queue, queue->ack_fd, spa_strerror(res));
spa_loop_control_hook_after(&impl->hooks_list);
res = item->res;
}
else {