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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [vx-share/] [wait.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
/* wait.h - header file for remote wait call */
2
 
3
/*  Copyright 1992 Free Software Foundation, Inc.
4
 
5
    This code was donated by Wind River Systems, Inc. */
6
 
7
/*
8
modification history
9
--------------------
10
01a,05jun90,llk  borrowed.
11
*/
12
 
13
/* Define how to access the structure that the wait system call stores.
14
   On many systems, there is a structure defined for this.
15
   But on vanilla-ish USG systems there is not.  */
16
 
17
#ifndef HAVE_WAIT_STRUCT
18
#define WAITTYPE int
19
#define WIFSTOPPED(w) (((w)&0377) == 0177)
20
#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
21
#define WIFEXITED(w) (((w)&0377) == 0)
22
#define WRETCODE(w) ((w) >> 8)
23
#define WSTOPSIG(w) ((w) >> 8)
24
#define WCOREDUMP(w) (((w)&0200) != 0)
25
#define WTERMSIG(w) ((w) & 0177)
26
#define WSETEXIT(w, status) ((w) = (status))
27
#define WSETSTOP(w,sig)  ((w) = (0177 | ((sig) << 8)))
28
#else
29
#if FALSE
30
#ifndef ORIG
31
 
32
/* don't include sys/wait.h */
33
 
34
#else ORIG
35
#include <sys/wait.h>
36
#endif ORIG
37
#endif FALSE
38
#define WAITTYPE union wait
39
#define WRETCODE(w) (w).w_retcode
40
#define WSTOPSIG(w) (w).w_stopsig
41
#define WCOREDUMP(w) (w).w_coredump
42
#define WTERMSIG(w) (w).w_termsig
43
#define WSETEXIT(w, status) ((w).w_status = (status))
44
#define WSETSTOP(w,sig)  \
45
  ((w).w_stopsig = (sig), (w).w_coredump = 0, (w).w_termsig = 0177)
46
#endif

powered by: WebSVN 2.1.0

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