diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-09-10 21:58:01 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-09-10 21:58:01 +0000 |
commit | de21b54bd1f1d2caa5c20da4be0dc118b0ab7c34 (patch) | |
tree | f9d21ded32e9150495866fcf4b260721405fec69 /src/pulse/thread-mainloop.c | |
parent | a6f8b813aee1b387f45ff791d75d99580eab574d (diff) |
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
Diffstat (limited to 'src/pulse/thread-mainloop.c')
-rw-r--r-- | src/pulse/thread-mainloop.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c index 0ed54837..29769e2b 100644 --- a/src/pulse/thread-mainloop.c +++ b/src/pulse/thread-mainloop.c @@ -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; +} |