mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-17 06:59:56 -05:00
add new API pa_threaded_mainloop_in_thread(), update test case for it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1795 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a6f8b813ae
commit
de21b54bd1
3 changed files with 17 additions and 7 deletions
|
|
@ -223,3 +223,9 @@ pa_mainloop_api* pa_threaded_mainloop_get_api(pa_threaded_mainloop*m) {
|
|||
|
||||
return pa_mainloop_get_api(m->real_mainloop);
|
||||
}
|
||||
|
||||
int pa_threaded_mainloop_in_thread(pa_threaded_mainloop *m) {
|
||||
pa_assert(m);
|
||||
|
||||
return m->thread && pa_thread_self() == m->thread;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -297,6 +297,9 @@ int pa_threaded_mainloop_get_retval(pa_threaded_mainloop *m);
|
|||
/** Return the abstract main loop abstraction layer vtable for this main loop. */
|
||||
pa_mainloop_api* pa_threaded_mainloop_get_api(pa_threaded_mainloop*m);
|
||||
|
||||
/** Returns non-zero when called from withing the event loop thread. \since 0.9.7 */
|
||||
int pa_threaded_mainloop_in_thread(pa_threaded_mainloop *m);
|
||||
|
||||
PA_C_DECL_END
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue