Logo Search packages:      
Sourcecode: pulseaudio version File versions

void pa_threaded_mainloop_wait ( pa_threaded_mainloop m  ) 

Wait for an event to be signalled by the event loop thread. You can use this to pass data from the event loop thread to the main thread in synchronized fashion. This function may not be called inside the event loop thread. Prior to this call the event loop object needs to be locked using pa_threaded_mainloop_lock(). While waiting the lock will be released, immediately before returning it will be acquired again. This function may spuriously wake up even without _signal() being called. You need to make sure to handle that!

Definition at line 201 of file thread-mainloop.c.


    /* Make sure that this function is not called from the helper thread */
    pa_assert(!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m));

    m->n_waiting ++;

    pa_cond_wait(m->cond, m->mutex);

    pa_assert(m->n_waiting > 0);
    m->n_waiting --;

Generated by  Doxygen 1.6.0   Back to index