diff --git a/src/pulse/internal.h b/src/pulse/internal.h
index 5fe4210..c484175 100644
|
a
|
b
|
|
| 221 | 221 | int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, pa_bool_t fail); |
| 222 | 222 | pa_operation* pa_context_send_simple_command(pa_context *c, uint32_t command, void (*internal_callback)(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata), void (*cb)(void), void *userdata); |
| 223 | 223 | |
| | 224 | int pa_signal_initialized(pa_mainloop_api *a); |
| | 225 | |
| 224 | 226 | void pa_stream_set_state(pa_stream *s, pa_stream_state_t st); |
| 225 | 227 | |
| 226 | 228 | pa_tagstruct *pa_tagstruct_command(pa_context *c, uint32_t command, uint32_t *tag); |
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index d09f4b0..b103056 100644
|
a
|
b
|
|
| 45 | 45 | #include <pulsecore/log.h> |
| 46 | 46 | #include <pulsecore/macro.h> |
| 47 | 47 | |
| | 48 | #include "internal.h" |
| 48 | 49 | #include "mainloop-signal.h" |
| 49 | 50 | |
| 50 | 51 | struct pa_signal_event { |
| … |
… |
|
| 141 | 142 | return 0; |
| 142 | 143 | } |
| 143 | 144 | |
| | 145 | int pa_signal_initialized(pa_mainloop_api *a) { |
| | 146 | return api && api == a; |
| | 147 | } |
| | 148 | |
| 144 | 149 | void pa_signal_done(void) { |
| 145 | 150 | while (signals) |
| 146 | 151 | pa_signal_free(signals); |
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index fb73ff1..58517ed 100644
|
a
|
b
|
|
| 43 | 43 | #include <pulsecore/mutex.h> |
| 44 | 44 | #include <pulsecore/macro.h> |
| 45 | 45 | |
| | 46 | #include "internal.h" |
| 46 | 47 | #include "thread-mainloop.h" |
| 47 | 48 | |
| 48 | 49 | struct pa_threaded_mainloop { |
| … |
… |
|
| 77 | 78 | static void thread(void *userdata) { |
| 78 | 79 | pa_threaded_mainloop *m = userdata; |
| 79 | 80 | |
| | 81 | |
| 80 | 82 | #ifndef OS_IS_WIN32 |
| 81 | | sigset_t mask; |
| | 83 | if (pa_signal_initialized(pa_threaded_mainloop_get_api(m))) { |
| | 84 | sigset_t mask; |
| 82 | 85 | |
| 83 | | /* Make sure that signals are delivered to the main thread */ |
| 84 | | sigfillset(&mask); |
| 85 | | pthread_sigmask(SIG_BLOCK, &mask, NULL); |
| | 86 | /* Make sure that signals are delivered to the main thread */ |
| | 87 | sigfillset(&mask); |
| | 88 | pthread_sigmask(SIG_BLOCK, &mask, NULL); |
| | 89 | } |
| 86 | 90 | #endif |
| 87 | 91 | |
| 88 | 92 | pa_mutex_lock(m->mutex); |