diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-26 22:26:51 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-26 22:26:51 +0100 |
| commit | 4625b25287d41948a0ae393c49619d9b909bc51c (patch) | |
| tree | 47d954ae8c36ee806813eeef61b5536c7a3a78f5 /src/threading.cpp | |
| parent | 8d8b3fd07131664f467981d17e80e44c0a708cc2 (diff) | |
Wrap linux specific code for `internal_thread_proc`
Diffstat (limited to 'src/threading.cpp')
| -rw-r--r-- | src/threading.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/threading.cpp b/src/threading.cpp index c8a15e2a6..7a802fd71 100644 --- a/src/threading.cpp +++ b/src/threading.cpp @@ -1,4 +1,4 @@ -#if defined(GB_SYSTEM_UNIX) +#if defined(GB_SYSTEM_LINUX) #include <signal.h> #endif @@ -361,10 +361,12 @@ void gb__thread_run(Thread *t) { } #else void *internal_thread_proc(void *arg) { - // NOTE: Don't permit any signal delivery to threads. + #if (GB_SYSTEM_LINUX) + // NOTE: Don't permit any signal delivery to threads on Linux. sigset_t mask = {}; sigfillset(&mask); GB_ASSERT_MSG(pthread_sigmask(SIG_BLOCK, &mask, nullptr) == 0, "failed to block signals"); + #endif Thread *t = cast(Thread *)arg; gb__thread_run(t); |