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] - Diff between revs 1010 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 1010 Rev 1765
/* FIXME: From sys/sysvi386/sys */
/* FIXME: From sys/sysvi386/sys */
#ifndef _WAIT_H
#ifndef _WAIT_H
# define _WAIT_H
# define _WAIT_H
 
 
# define WNOHANG 1
# define WNOHANG 1
# define WUNTRACED 2
# define WUNTRACED 2
 
 
/*
/*
 * Unlike the atrocity that BSD ended up using, we do not have a "union
 * Unlike the atrocity that BSD ended up using, we do not have a "union
 * wait," although I could probably implement one.  Given the code I
 * wait," although I could probably implement one.  Given the code I
 * sometimes end up porting, it might be a good thing.  Anyway, the
 * sometimes end up porting, it might be a good thing.  Anyway, the
 * format of a stat thingy, filled in by the wait*() routines, is:
 * format of a stat thingy, filled in by the wait*() routines, is:
 * struct {
 * struct {
 *    int filler:16;
 *    int filler:16;
 *    union {
 *    union {
 *        struct stopped {
 *        struct stopped {
 *            int signo:8;
 *            int signo:8;
 *            int o177:8;       // will be 0177
 *            int o177:8;       // will be 0177
 *        };
 *        };
 *        struct exited {
 *        struct exited {
 *            int retval:8;
 *            int retval:8;
 *            int zero:8;       // 0, obviously 8-)
 *            int zero:8;       // 0, obviously 8-)
 *        };
 *        };
 *        struct termed {
 *        struct termed {
 *            int zero:8;       // zeroes
 *            int zero:8;       // zeroes
 *            int corep:1;      // was there a core file?
 *            int corep:1;      // was there a core file?
 *            int signo:7;      // what?!  Only 127 signals?!
 *            int signo:7;      // what?!  Only 127 signals?!
 *        };
 *        };
 *        int value:16;
 *        int value:16;
 *     };
 *     };
 * };
 * };
 *
 *
 * Braver souls than I can turn that into a union wait, if desired.  Ick.
 * Braver souls than I can turn that into a union wait, if desired.  Ick.
 */
 */
 
 
# define WIFEXITED(val) ((val)&0xff)
# define WIFEXITED(val) ((val)&0xff)
# define WEXITSTATUS(val)       (((val)>>8)&0xff)
# define WEXITSTATUS(val)       (((val)>>8)&0xff)
# define WIFSIGNALED(val)       ((val) && !((val)&0xff))
# define WIFSIGNALED(val)       ((val) && !((val)&0xff))
# define WTERMSIG(val)  (((val)>>8)&0x7f)
# define WTERMSIG(val)  (((val)>>8)&0x7f)
# define WIFSTOPPED(val) (((val)&0xff)==0177)
# define WIFSTOPPED(val) (((val)&0xff)==0177)
# define WSTOPSIG(val)  (((val)>>8)&0xff)
# define WSTOPSIG(val)  (((val)>>8)&0xff)
#endif  /* _SYS_WAIT_H */
#endif  /* _SYS_WAIT_H */
 
 
 
 

powered by: WebSVN 2.1.0

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