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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [sys/] [sysvi386/] [sys/] [wait.h] - Blame information for rev 262

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

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

powered by: WebSVN 2.1.0

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