Logo
Explore Help
Sign In
fluencelabs/musl
1
0
Fork 0
You've already forked musl
mirror of https://github.com/fluencelabs/musl synced 2025-06-30 07:02:41 +00:00
Code Issues Projects Releases Wiki Activity
Files
1e597a3e9bbdbe82d2ffd3963019d3a3edeed859
musl/src/thread/pthread_sigmask.c

11 lines
239 B
C
Raw Normal View History

fix error handling for pthread_sigmask it must return errno, not -1, and should reject invalud values for how.
2011-03-09 20:31:06 -05:00
#include <signal.h>
#include <errno.h>
#include <pthread.h>
clean up pthread_sigmask/sigprocmask dependency order it's nicer for the function that doesn't use errno to be independent, and have the other one call it. saves some time and avoids clobbering errno.
2011-07-30 21:09:14 -04:00
#include "syscall.h"
fix error handling for pthread_sigmask it must return errno, not -1, and should reject invalud values for how.
2011-03-09 20:31:06 -05:00
int pthread_sigmask(int how, const sigset_t *set, sigset_t *old)
{
clean up pthread_sigmask/sigprocmask dependency order it's nicer for the function that doesn't use errno to be independent, and have the other one call it. saves some time and avoids clobbering errno.
2011-07-30 21:09:14 -04:00
if (how > 2U) return EINVAL;
return -__syscall(SYS_rt_sigprocmask, how, set, old, 8);
fix error handling for pthread_sigmask it must return errno, not -1, and should reject invalud values for how.
2011-03-09 20:31:06 -05:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 557ms Template: 18ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API