Move suspend on idle in module

Move suspend-on-idle code from the node to a module
Add some more SpaLoop API
This commit is contained in:
Wim Taymans 2016-11-21 12:54:40 +01:00
parent d250ed42e6
commit 3dcbf4b228
13 changed files with 363 additions and 110 deletions

View file

@ -284,11 +284,17 @@ pinos_loop_set_hooks (PinosLoop *loop,
}
void
pinos_loop_set_thread (PinosLoop *loop,
void *thread)
pinos_loop_enter_thread (PinosLoop *loop)
{
PinosLoopImpl *impl = SPA_CONTAINER_OF (loop, PinosLoopImpl, this);
impl->thread = *((pthread_t*)thread);
impl->thread = pthread_self();
}
void
pinos_loop_leave_thread (PinosLoop *loop)
{
PinosLoopImpl *impl = SPA_CONTAINER_OF (loop, PinosLoopImpl, this);
impl->thread = 0;
}
SpaResult