OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [sys/] [sparc64/] [sys/] [wait.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1010 ivang
/* FIXME: From sys/sysvi386/sys */
2
#ifndef _WAIT_H
3
# define _WAIT_H
4
 
5
# define WNOHANG 1
6
# define WUNTRACED 2
7
 
8
/*
9
 * Unlike the atrocity that BSD ended up using, we do not have a "union
10
 * wait," although I could probably implement one.  Given the code I
11
 * sometimes end up porting, it might be a good thing.  Anyway, the
12
 * format of a stat thingy, filled in by the wait*() routines, is:
13
 * struct {
14
 *    int filler:16;
15
 *    union {
16
 *        struct stopped {
17
 *            int signo:8;
18
 *            int o177:8;       // will be 0177
19
 *        };
20
 *        struct exited {
21
 *            int retval:8;
22
 *            int zero:8;       // 0, obviously 8-)
23
 *        };
24
 *        struct termed {
25
 *            int zero:8;       // zeroes
26
 *            int corep:1;      // was there a core file?
27
 *            int signo:7;      // what?!  Only 127 signals?!
28
 *        };
29
 *        int value:16;
30
 *     };
31
 * };
32
 *
33
 * Braver souls than I can turn that into a union wait, if desired.  Ick.
34
 */
35
 
36
# define WIFEXITED(val) ((val)&0xff)
37
# define WEXITSTATUS(val)       (((val)>>8)&0xff)
38
# define WIFSIGNALED(val)       ((val) && !((val)&0xff))
39
# define WTERMSIG(val)  (((val)>>8)&0x7f)
40
# define WIFSTOPPED(val) (((val)&0xff)==0177)
41
# define WSTOPSIG(val)  (((val)>>8)&0xff)
42
#endif  /* _SYS_WAIT_H */
43
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.