Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Unified Diff: fusl/src/signal/sigqueue.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/signal/sigprocmask.c ('k') | fusl/src/signal/sigrelse.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/signal/sigqueue.c
diff --git a/fusl/src/signal/sigqueue.c b/fusl/src/signal/sigqueue.c
new file mode 100644
index 0000000000000000000000000000000000000000..b75f0c5cea42f7f03a23ef3f130d1c507f8c2df4
--- /dev/null
+++ b/fusl/src/signal/sigqueue.c
@@ -0,0 +1,22 @@
+#include <signal.h>
+#include <string.h>
+#include <unistd.h>
+#include "syscall.h"
+#include "pthread_impl.h"
+
+int sigqueue(pid_t pid, int sig, const union sigval value)
+{
+ siginfo_t si;
+ sigset_t set;
+ int r;
+ memset(&si, 0, sizeof si);
+ si.si_signo = sig;
+ si.si_code = SI_QUEUE;
+ si.si_value = value;
+ si.si_uid = getuid();
+ __block_app_sigs(&set);
+ si.si_pid = getpid();
+ r = syscall(SYS_rt_sigqueueinfo, pid, sig, &si);
+ __restore_sigs(&set);
+ return r;
+}
« no previous file with comments | « fusl/src/signal/sigprocmask.c ('k') | fusl/src/signal/sigrelse.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698