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

void pa_mainloop_api_once ( pa_mainloop_api m,
void(*)(pa_mainloop_api *m, void *userdata)  callback,
void *  userdata 

Run the specified callback function once from the main loop using an anonymous defer event.

Definition at line 63 of file mainloop-api.c.

References pa_mainloop_api::defer_new, pa_mainloop_api::defer_set_destroy, and pa_xnew.

    struct once_info *i;
    pa_defer_event *e;


    i = pa_xnew(struct once_info, 1);
    i->callback = callback;
    i->userdata = userdata;

    pa_assert_se(e = m->defer_new(m, once_callback, i));
    m->defer_set_destroy(e, free_callback);

Generated by  Doxygen 1.6.0   Back to index