loop: use simple hook emission

Add new simple hook emision without a cursor. The one with the cursor
is not thread safe and is not needed for the loop.
This commit is contained in:
Wim Taymans 2018-09-24 11:35:46 +02:00
parent 0aca605bfb
commit 1b933e5b32
2 changed files with 14 additions and 2 deletions

View file

@ -104,8 +104,8 @@ struct spa_loop_control_hooks {
void (*after) (void *data);
};
#define spa_loop_control_hook_before(l) spa_hook_list_call(l, struct spa_loop_control_hooks, before, 0)
#define spa_loop_control_hook_after(l) spa_hook_list_call(l, struct spa_loop_control_hooks, after, 0)
#define spa_loop_control_hook_before(l) spa_hook_list_call_simple(l, struct spa_loop_control_hooks, before, 0)
#define spa_loop_control_hook_after(l) spa_hook_list_call_simple(l, struct spa_loop_control_hooks, after, 0)
/**
* Control an event loop