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

Side by Side Diff: fusl/src/thread/pthread_sigmask.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 #include <signal.h> 1 #include <signal.h>
2 #include <errno.h> 2 #include <errno.h>
3 #include "syscall.h" 3 #include "syscall.h"
4 4
5 int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict ol d) 5 int pthread_sigmask(int how,
6 { 6 const sigset_t* restrict set,
7 » int ret; 7 sigset_t* restrict old) {
8 » if ((unsigned)how - SIG_BLOCK > 2U) return EINVAL; 8 int ret;
9 » ret = -__syscall(SYS_rt_sigprocmask, how, set, old, _NSIG/8); 9 if ((unsigned)how - SIG_BLOCK > 2U)
10 » if (!ret && old) { 10 return EINVAL;
11 » » if (sizeof old->__bits[0] == 8) { 11 ret = -__syscall(SYS_rt_sigprocmask, how, set, old, _NSIG / 8);
12 » » » old->__bits[0] &= ~0x380000000ULL; 12 if (!ret && old) {
13 » » } else { 13 if (sizeof old->__bits[0] == 8) {
14 » » » old->__bits[0] &= ~0x80000000UL; 14 old->__bits[0] &= ~0x380000000ULL;
15 » » » old->__bits[1] &= ~0x3UL; 15 } else {
16 » » } 16 old->__bits[0] &= ~0x80000000UL;
17 » } 17 old->__bits[1] &= ~0x3UL;
18 » return ret; 18 }
19 }
20 return ret;
19 } 21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698