diff options
author | Colin Cross <ccross@android.com> | 2022-09-30 10:46:33 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2022-09-30 10:51:59 -0700 |
commit | 44f6d32cb6a38950c0e965301c69cae02aa5ca25 (patch) | |
tree | 6eae4d5ee76833ac13a2a2d8857c64a67c83a42c | |
parent | aa450e62f093f7e9936932415386cd4ba832891e (diff) | |
download | musl-44f6d32cb6a38950c0e965301c69cae02aa5ca25.tar.gz |
Revert "FROMLIST: Add pthread_sigqueue"
This reverts commit 0ee7f66d317584be155080902cb8e74bc5e06945.
pthread_sigqueue was only used by art/sigchainlib/sigchain_test.cc,
which has been switched to sigqueue. Remove the non-upstream
pthread_sigqueue addition.
Bug: 188576657
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ied8289cf8fbde94151d4e9711c0848b93eb725ca
-rw-r--r-- | include/signal.h | 1 | ||||
-rw-r--r-- | sources.bp | 1 | ||||
-rw-r--r-- | src/thread/pthread_sigqueue.c | 22 |
3 files changed, 0 insertions, 24 deletions
diff --git a/include/signal.h b/include/signal.h index b6711bc4..c347f861 100644 --- a/include/signal.h +++ b/include/signal.h @@ -229,7 +229,6 @@ int sigqueue(pid_t, int, union sigval); int pthread_sigmask(int, const sigset_t *__restrict, sigset_t *__restrict); int pthread_kill(pthread_t, int); -int pthread_sigqueue(pthread_t, int, union sigval); void psiginfo(const siginfo_t *, const char *); void psignal(int, const char *); @@ -1118,7 +1118,6 @@ cc_defaults { "src/thread/pthread_setschedprio.c", "src/thread/pthread_setspecific.c", "src/thread/pthread_sigmask.c", - "src/thread/pthread_sigqueue.c", "src/thread/pthread_spin_destroy.c", "src/thread/pthread_spin_init.c", "src/thread/pthread_spin_lock.c", diff --git a/src/thread/pthread_sigqueue.c b/src/thread/pthread_sigqueue.c deleted file mode 100644 index 9c347933..00000000 --- a/src/thread/pthread_sigqueue.c +++ /dev/null @@ -1,22 +0,0 @@ -#include <signal.h> -#include <string.h> -#include <unistd.h> -#include "pthread_impl.h" -#include "lock.h" - -int pthread_sigqueue(pthread_t t, int sig, const union sigval value) -{ - siginfo_t si; - int r; - memset(&si, 0, sizeof si); - si.si_signo = sig; - si.si_code = SI_QUEUE; - si.si_value = value; - si.si_uid = getuid(); - si.si_pid = getpid(); - LOCK(t->killlock); - r = t->tid ? -__syscall(SYS_rt_tgsigqueueinfo, si.si_pid, t->tid, sig, &si) - : (sig+0U >= _NSIG ? EINVAL : 0); - UNLOCK(t->killlock); - return r; -} |