mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Fix some, but not all style bugs.
This commit is contained in:
parent
47f654d3a0
commit
0658e085a7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97718
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993, 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
@ -38,32 +38,32 @@
|
||||
#define _SYS_WAIT_H_
|
||||
|
||||
/*
|
||||
* This file holds definitions relevant to the wait4 system call
|
||||
* and the alternate interfaces that use it (wait, wait3, waitpid).
|
||||
* This file holds definitions relevant to the wait4 system call and the
|
||||
* alternate interfaces that use it (wait, wait3, waitpid).
|
||||
*/
|
||||
|
||||
/*
|
||||
* Macros to test the exit status returned by wait
|
||||
* and extract the relevant values.
|
||||
* Macros to test the exit status returned by wait and extract the relevant
|
||||
* values.
|
||||
*/
|
||||
#ifdef _POSIX_SOURCE
|
||||
#define _W_INT(i) (i)
|
||||
#else
|
||||
#define _W_INT(w) (*(int *)&(w)) /* convert union wait to int */
|
||||
#define _W_INT(w) (*(int *)&(w)) /* Convert union wait to int. */
|
||||
#define WCOREFLAG 0200
|
||||
#endif
|
||||
|
||||
#define _WSTATUS(x) (_W_INT(x) & 0177)
|
||||
#define _WSTOPPED 0177 /* _WSTATUS if process is stopped */
|
||||
#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED)
|
||||
#define WSTOPSIG(x) (_W_INT(x) >> 8)
|
||||
#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0)
|
||||
#define WTERMSIG(x) (_WSTATUS(x))
|
||||
#define WIFEXITED(x) (_WSTATUS(x) == 0)
|
||||
#define WEXITSTATUS(x) (_W_INT(x) >> 8)
|
||||
#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED)
|
||||
#define WSTOPSIG(x) (_W_INT(x) >> 8)
|
||||
#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0)
|
||||
#define WTERMSIG(x) (_WSTATUS(x))
|
||||
#define WIFEXITED(x) (_WSTATUS(x) == 0)
|
||||
#define WEXITSTATUS(x) (_W_INT(x) >> 8)
|
||||
#define WIFCONTINUED(x) (x == 0x13) /* 0x13 == SIGCONT */
|
||||
#ifndef _POSIX_SOURCE
|
||||
#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG)
|
||||
#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG)
|
||||
|
||||
#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
|
||||
#define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED)
|
||||
@ -78,10 +78,10 @@
|
||||
* this option is done, it is as though they were still running... nothing
|
||||
* about them is returned.
|
||||
*/
|
||||
#define WNOHANG 1 /* don't hang in wait */
|
||||
#define WUNTRACED 2 /* tell about stopped, untraced children */
|
||||
#define WNOHANG 1 /* Don't hang in wait. */
|
||||
#define WUNTRACED 2 /* Tell about stopped, untraced children. */
|
||||
#define WCONTINUED 4 /* Report a job control continued process. */
|
||||
#define WLINUXCLONE 0x80000000 /* wait for kthread spawned from linux_clone */
|
||||
#define WLINUXCLONE 0x80000000 /* Wait for kthread spawned from linux_clone. */
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
/* POSIX extensions and 4.2/4.3 compatibility: */
|
||||
@ -120,9 +120,8 @@ union wait {
|
||||
#endif
|
||||
} w_T;
|
||||
/*
|
||||
* Stopped process status. Returned
|
||||
* only for traced children unless requested
|
||||
* with the WUNTRACED option bit.
|
||||
* Stopped process status. Returned only for traced children unless
|
||||
* requested with the WUNTRACED option bit.
|
||||
*/
|
||||
struct {
|
||||
#if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
@ -138,10 +137,10 @@ union wait {
|
||||
} w_S;
|
||||
};
|
||||
#define w_termsig w_T.w_Termsig
|
||||
#define w_coredump w_T.w_Coredump
|
||||
#define w_retcode w_T.w_Retcode
|
||||
#define w_stopval w_S.w_Stopval
|
||||
#define w_stopsig w_S.w_Stopsig
|
||||
#define w_coredump w_T.w_Coredump
|
||||
#define w_retcode w_T.w_Retcode
|
||||
#define w_stopval w_S.w_Stopval
|
||||
#define w_stopsig w_S.w_Stopsig
|
||||
|
||||
#define WSTOPPED _WSTOPPED
|
||||
#endif /* _POSIX_SOURCE */
|
||||
|
Loading…
Reference in New Issue
Block a user