diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-07 14:51:28 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-07 14:52:27 +0100 |
commit | 2b45b7a45c67dde354b36ab1c1929193e704418d (patch) | |
tree | 60a9b3df5d67001c6fdbea85aaef6855af4fade1 /Libraries/LibPthread | |
parent | 95b086f47f4f63eadcb70c9b817739db77a0e197 (diff) | |
download | serenity-2b45b7a45c67dde354b36ab1c1929193e704418d.zip |
LibPthread: Implement pthread_sigmask()
Diffstat (limited to 'Libraries/LibPthread')
-rw-r--r-- | Libraries/LibPthread/pthread.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibPthread/pthread.cpp b/Libraries/LibPthread/pthread.cpp index 8e5e368005..061d19f427 100644 --- a/Libraries/LibPthread/pthread.cpp +++ b/Libraries/LibPthread/pthread.cpp @@ -5,6 +5,7 @@ #include <Kernel/Syscall.h> #include <limits.h> #include <pthread.h> +#include <signal.h> #include <stdio.h> #include <sys/mman.h> #include <time.h> @@ -90,6 +91,13 @@ int pthread_detach(pthread_t thread) return syscall(SC_detach_thread, thread); } +int pthread_sigmask(int how, const sigset_t* set, sigset_t* old_set) +{ + if (sigprocmask(how, set, old_set)) + return errno; + return 0; +} + int pthread_mutex_init(pthread_mutex_t* mutex, const pthread_mutexattr_t* attributes) { // FIXME: Implement mutex attributes |