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

Side by Side Diff: fusl/include/sys/wait.h

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 #ifndef»_SYS_WAIT_H 1 #ifndef _SYS_WAIT_H
2 #define»_SYS_WAIT_H 2 #define _SYS_WAIT_H
3 #ifdef __cplusplus 3 #ifdef __cplusplus
4 extern "C" { 4 extern "C" {
5 #endif 5 #endif
6 6
7 #include <features.h> 7 #include <features.h>
8 8
9 #define __NEED_pid_t 9 #define __NEED_pid_t
10 #define __NEED_id_t 10 #define __NEED_id_t
11 #include <bits/alltypes.h> 11 #include <bits/alltypes.h>
12 12
13 typedef enum { 13 typedef enum { P_ALL = 0, P_PID = 1, P_PGID = 2 } idtype_t;
14 » P_ALL = 0,
15 » P_PID = 1,
16 » P_PGID = 2
17 } idtype_t;
18 14
19 pid_t wait (int *); 15 pid_t wait(int*);
20 pid_t waitpid (pid_t, int *, int ); 16 pid_t waitpid(pid_t, int*, int);
21 17
22 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ 18 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \
23 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ 19 defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
24 || defined(_BSD_SOURCE)
25 #include <signal.h> 20 #include <signal.h>
26 int waitid (idtype_t, id_t, siginfo_t *, int); 21 int waitid(idtype_t, id_t, siginfo_t*, int);
27 #endif 22 #endif
28 23
29 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 24 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
30 #include <sys/resource.h> 25 #include <sys/resource.h>
31 pid_t wait3 (int *, int, struct rusage *); 26 pid_t wait3(int*, int, struct rusage*);
32 pid_t wait4 (pid_t, int *, int, struct rusage *); 27 pid_t wait4(pid_t, int*, int, struct rusage*);
33 #endif 28 #endif
34 29
35 #define WNOHANG 1 30 #define WNOHANG 1
36 #define WUNTRACED 2 31 #define WUNTRACED 2
37 32
38 #define WSTOPPED 2 33 #define WSTOPPED 2
39 #define WEXITED 4 34 #define WEXITED 4
40 #define WCONTINUED 8 35 #define WCONTINUED 8
41 #define WNOWAIT 0x1000000 36 #define WNOWAIT 0x1000000
42 37
43 #define __WNOTHREAD 0x20000000 38 #define __WNOTHREAD 0x20000000
44 #define __WALL 0x40000000 39 #define __WALL 0x40000000
45 #define __WCLONE 0x80000000 40 #define __WCLONE 0x80000000
46 41
47 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8) 42 #define WEXITSTATUS(s) (((s)&0xff00) >> 8)
48 #define WTERMSIG(s) ((s) & 0x7f) 43 #define WTERMSIG(s) ((s)&0x7f)
49 #define WSTOPSIG(s) WEXITSTATUS(s) 44 #define WSTOPSIG(s) WEXITSTATUS(s)
50 #define WCOREDUMP(s) ((s) & 0x80) 45 #define WCOREDUMP(s) ((s)&0x80)
51 #define WIFEXITED(s) (!WTERMSIG(s)) 46 #define WIFEXITED(s) (!WTERMSIG(s))
52 #define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00) 47 #define WIFSTOPPED(s) ((short)((((s)&0xffff) * 0x10001) >> 8) > 0x7f00)
53 #define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu) 48 #define WIFSIGNALED(s) (((s)&0xffff) - 1U < 0xffu)
54 #define WIFCONTINUED(s) ((s) == 0xffff) 49 #define WIFCONTINUED(s) ((s) == 0xffff)
55 50
56 #ifdef __cplusplus 51 #ifdef __cplusplus
57 } 52 }
58 #endif 53 #endif
59 #endif 54 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698