diff options
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/signal.h | 83 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 4 |
2 files changed, 53 insertions, 34 deletions
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h index 1e2863404..87af7c883 100644 --- a/winsup/cygwin/include/cygwin/signal.h +++ b/winsup/cygwin/include/cygwin/signal.h @@ -1,6 +1,20 @@ +/* signal.h + + Copyright 2004 Red Hat, Inc. + + This file is part of Cygwin. + + This software is a copyrighted work licensed under the terms of the + Cygwin license. Please consult the file "CYGWIN_LICENSE" for + details. */ + #ifndef _CYGWIN_SIGNAL_H #define _CYGWIN_SIGNAL_H +#ifdef __cplusplus +extern "C" { +#endif + #if 0 struct ucontext { @@ -8,7 +22,7 @@ struct ucontext void *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; - sigset_t uc_sigmask; + sigset_t uc_sigmask; }; #endif @@ -18,49 +32,55 @@ typedef union sigval void *sival_ptr; /* pointer signal value */ } sigval_t; +typedef struct sigevent +{ + sigval_t sigev_value; /* signal value */ + int sigev_signo; /* signal number */ + int sigev_notify; /* notification type */ + void (*sigev_notify_function) (sigval_t); /* notification function */ + pthread_attr_t *sigev_notify_attributes; /* notification attributes */ +} sigevent_t; + #pragma pack(push,4) typedef struct { int si_signo; /* signal number */ - int si_errno; /* errno associated with signal */ int si_code; /* signal code */ + pid_t si_pid; /* sender's pid */ + uid_t si_uid; /* sender's uid */ + int si_errno; /* errno associated with signal */ union { - int __pad[128]; /* plan for future growth */ - + __uint32_t __pad[32]; /* plan for future growth */ union { - /* timers */ + /* timers */ struct { - unsigned int si_tid; /* timer id */ - unsigned int si_overrun; /* overrun count */ + union + { + struct + { + timer_t si_tid; /* timer id */ + unsigned int si_overrun; /* overrun count */ + }; + sigval_t si_sigval; /* signal value */ + sigval_t si_value; /* signal value */ + }; }; - - /* POSIX signals or signals invoked by kill() */ - struct - { - pid_t si_pid; /* sender's pid */ - uid_t si_uid; /* sender's uid */ - }; - sigval_t si_sigval; /* signal value */ }; + /* SIGCHLD */ struct { - pid_t si_pid2; /* which child */ - uid_t si_uid2; /* sender's uid */ - int si_status; /* exit code */ + int si_status; /* exit code */ clock_t si_utime; /* user time */ clock_t si_stime; /* system time */ }; /* core dumping signals */ - struct - { - void *si_addr; /* faulting address */ - }; + void *si_addr; /* faulting address */ }; } siginfo_t; #pragma pack(pop) @@ -77,7 +97,7 @@ enum unimplemented) */ SI_KERNEL, /* sent by system */ - ILL_ILLOP, /* illegal opcode */ + ILL_ILLOPC, /* illegal opcode */ ILL_ILLOPN, /* illegal operand */ ILL_ILLADR, /* illegal addressing mode */ ILL_ILLTRP, /* illegal trap*/ @@ -110,15 +130,6 @@ enum CLD_CONTINUED /* stopped child has continued */ }; -typedef struct sigevent -{ - sigval_t sigev_value; /* signal value */ - int sigev_signo; /* signal number */ - int sigev_notify; /* notification type */ - void (*sigev_notify_function) (sigval_t); /* notification function */ - pthread_attr_t *sigev_notify_attributes; /* notification attributes */ -} sigevent_t; - enum { SIGEV_SIGNAL = 0, /* a queued signal, with an application @@ -133,7 +144,7 @@ enum typedef void (*_sig_func_ptr)(int); -struct sigaction +struct sigaction { union { @@ -188,4 +199,10 @@ struct sigaction #define SIGUSR1 30 /* user defined signal 1 */ #define SIGUSR2 31 /* user defined signal 2 */ #define NSIG 32 /* signal 0 implied */ + +int sigwait (const sigset_t *, int *); +int sigwaitinfo (const sigset_t *, siginfo_t *); +#ifdef __cplusplus +} +#endif #endif /*_CYGWIN_SIGNAL_H*/ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 1a91721ef..e8b557797 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -233,12 +233,14 @@ details. */ 106: Export flock. 107: Export fcntl64. 108: Remove unused (hopefully) reent_data export. + 109: Export clock_gettime, sigwaitinfo, timer_create, timer_delete, + timer_settime */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 108 +#define CYGWIN_VERSION_API_MINOR 109 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible |