Lines Matching refs:mainloop
36 #include <pulse/thread-mainloop.h>
74 * communication, calling any of those functions in the PA mainloop context
75 * could lead to the mainloop being blocked for long periods.
77 * To avoid this, we create a threaded-mainloop for Avahi calls, and push all
80 * 1. If access to PA data structures is needed, use the PA mainloop context
82 * 2. If a (blocking) avahi-client call is needed, use the Avahi mainloop
84 * We do have message queue to pass messages from the Avahi mainloop to the PA
85 * mainloop.
135 pa_threaded_mainloop *mainloop;
140 pa_hashmap *services; /* protect with mainloop lock */
154 /* Runs in PA mainloop context */
184 /* Can be used in either PA or Avahi mainloop context since the bits of u->core
214 /* Runs in Avahi mainloop context */
280 /* Runs in Avahi mainloop context */
394 /* Runs in PA mainloop context */
403 pa_threaded_mainloop_lock(u->mainloop);
429 pa_threaded_mainloop_unlock(u->mainloop);
434 /* Run from Avahi mainloop context */
451 /* Runs in PA mainloop context */
464 /* Runs in PA mainloop context */
470 pa_threaded_mainloop_lock(u->mainloop);
472 pa_threaded_mainloop_unlock(u->mainloop);
478 /* Runs in PA mainloop context */
483 pa_threaded_mainloop_lock(u->mainloop);
485 pa_threaded_mainloop_unlock(u->mainloop);
492 /* Runs in Avahi mainloop context */
529 /* Runs in Avahi mainloop context */
574 /* Runs in PA mainloop context */
587 pa_threaded_mainloop_lock(u->mainloop);
589 pa_threaded_mainloop_unlock(u->mainloop);
594 pa_threaded_mainloop_lock(u->mainloop);
596 pa_threaded_mainloop_unlock(u->mainloop);
608 /* Runs in Avahi mainloop context */
642 /* Runs in PA mainloop context */
732 /* Runs in Avahi mainloop context */
779 /* Runs in Avahi mainloop context */
801 pa_log_debug("Started Avahi threaded mainloop");
826 u->mainloop = pa_threaded_mainloop_new();
827 u->api = pa_threaded_mainloop_get_api(u->mainloop);
829 if (pa_thread_mq_init(&u->thread_mq, u->core->mainloop, u->rtpoll) < 0) {
854 pa_threaded_mainloop_set_name(u->mainloop, "avahi-ml");
855 if (pa_threaded_mainloop_start(u->mainloop) < 0)
858 pa_threaded_mainloop_lock(u->mainloop);
860 pa_threaded_mainloop_unlock(u->mainloop);
875 /* Runs in Avahi mainloop context */
904 pa_threaded_mainloop_lock(u->mainloop);
906 pa_threaded_mainloop_unlock(u->mainloop);
909 pa_threaded_mainloop_stop(u->mainloop);
910 pa_threaded_mainloop_free(u->mainloop);