Logo Search packages:      
Sourcecode: pulseaudio version File versions  Download package

pa_threaded_mainloop* pa_threaded_mainloop_new ( void   ) 

Allocate a new threaded main loop object. You have to call pa_threaded_mainloop_start() before the event loop thread starts running.

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

References pa_xnew.

                                                     {
    pa_threaded_mainloop *m;

    m = pa_xnew(pa_threaded_mainloop, 1);

    if (!(m->real_mainloop = pa_mainloop_new())) {
        pa_xfree(m);
        return NULL;
    }

    m->mutex = pa_mutex_new(TRUE, TRUE);
    m->cond = pa_cond_new();
    m->accept_cond = pa_cond_new();
    m->thread = NULL;

    pa_mainloop_set_poll_func(m->real_mainloop, poll_func, m->mutex);

    m->n_waiting = 0;

    return m;
}


Generated by  Doxygen 1.6.0   Back to index