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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [sys/] [sun4/] [sys/] [wait.h] - Blame information for rev 438

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/* 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.