1.1 --- a/epoc32/include/stdapis/signal.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/stdapis/signal.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,5 +1,4 @@
1.4 /*-
1.5 - * Copyright (c) Symbian Software Ltd 2006-2007. All rights reserved.
1.6 * Copyright (c) 1991, 1993
1.7 * The Regents of the University of California. All rights reserved.
1.8 *
1.9 @@ -27,6 +26,7 @@
1.10 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1.11 * SUCH DAMAGE.
1.12 *
1.13 + * Portions Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.14 * @(#)signal.h 8.3 (Berkeley) 3/30/94
1.15 * $FreeBSD: src/include/signal.h,v 1.24 2003/03/31 23:30:41 jeff Exp $
1.16 */
1.17 @@ -35,13 +35,13 @@
1.18 #define _SIGNAL_H_
1.19
1.20 #include <sys/cdefs.h>
1.21 -#include <sys/_types.h>
1.22 +#include <sys/types.h>
1.23 #include <sys/signal.h>
1.24
1.25 __BEGIN_DECLS
1.26
1.27 struct timespec;
1.28 -/* The following definitions have been taken from siglist.c file
1.29 +/* The following definitions have been taken from siglist.c file
1.30 * Once signals are implemented then these definitions must be moved to that
1.31 * file. (sys_signame,sys_siglist,sys_nsig) */
1.32
1.33 @@ -114,12 +114,97 @@
1.34 "User defined signal 1", /* SIGUSR1 */
1.35 "User defined signal 2" /* SIGUSR2 */
1.36 };
1.37 +
1.38 +#if !defined (SIG_BLOCK)
1.39 + #define SIG_UNBLOCK 1
1.40 + #define SIG_BLOCK 2
1.41 + #define SIG_SETMASK 3
1.42 +#endif
1.43 +
1.44 +/* Type for data associated with a signal. */
1.45 +union sigval
1.46 +{
1.47 + int sival_int;
1.48 + void *sival_ptr;
1.49 +};
1.50 +
1.51 +typedef struct __siginfo_t
1.52 +{
1.53 + int si_signo;
1.54 + int si_code;
1.55 + int si_errno;
1.56 + pid_t si_pid;
1.57 + uid_t si_uid;
1.58 + void *si_addr;
1.59 + int si_status;
1.60 + long si_band;
1.61 + union sigval si_value;
1.62 +} siginfo_t;
1.63 +
1.64 +
1.65 +typedef struct sigevent
1.66 +{
1.67 + union sigval sigev_value;
1.68 + int sigev_signo;
1.69 + int sigev_notify;
1.70 +
1.71 + void (*sigev_notify_function) (union sigval); /* Function to start. */
1.72 + void *sigev_notify_attributes; /* Really pthread_attr_t. */
1.73 +} sigevent_t;
1.74 +
1.75 +/* `sigev_notify' values. */
1.76 +enum
1.77 +{
1.78 + SIGEV_SIGNAL = 0, /* Notify via signal. */
1.79 +# define SIGEV_SIGNAL SIGEV_SIGNAL
1.80 + SIGEV_NONE, /* Other notification: meaningless. */
1.81 +# define SIGEV_NONE SIGEV_NONE
1.82 + SIGEV_THREAD, /* Deliver via thread creation. */
1.83 +# define SIGEV_THREAD SIGEV_THREAD
1.84 +
1.85 + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */
1.86 +#define SIGEV_THREAD_ID SIGEV_THREAD_ID
1.87 +};
1.88 +
1.89 static const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]);
1.90
1.91 IMPORT_C int sigaction(int sig, const struct sigaction *act, struct sigaction *oact);
1.92
1.93 IMPORT_C int sigemptyset(sigset_t* set);
1.94
1.95 +#ifdef SYMBIAN_OE_POSIX_SIGNALS
1.96 +IMPORT_C int kill(pid_t pid, int sig);
1.97 +IMPORT_C int raise(int sig);
1.98 +IMPORT_C int sigqueue(pid_t pid, int sig, const union sigval value);
1.99 +
1.100 +IMPORT_C int sigfillset(sigset_t *set);
1.101 +IMPORT_C int sigaddset(sigset_t *set, int signo);
1.102 +IMPORT_C int sigdelset(sigset_t *set, int signo);
1.103 +IMPORT_C int sigismember(const sigset_t *set, int signo);
1.104 +IMPORT_C int sigandset(sigset_t * set, const sigset_t * left, const sigset_t * right);
1.105 +IMPORT_C int sigorset(sigset_t * set, const sigset_t * left, const sigset_t * right);
1.106 +IMPORT_C int sigisemptyset(const sigset_t * set);
1.107 +
1.108 +IMPORT_C int sigprocmask(int how, const sigset_t* set,sigset_t* oset);
1.109 +IMPORT_C int sighold(int signo);
1.110 +IMPORT_C int sigrelse(int signo);
1.111 +IMPORT_C int sigpause(int signo);
1.112 +
1.113 +IMPORT_C int sigwait(const sigset_t *set, int *sig);
1.114 +IMPORT_C int sigtimedwait(const sigset_t *set, siginfo_t *info,
1.115 + const struct timespec *timeout);
1.116 +IMPORT_C int sigwaitinfo(const sigset_t *set, siginfo_t *info);
1.117 +
1.118 +IMPORT_C void (*bsd_signal(int, void (*)(int)))(int);
1.119 +IMPORT_C void (*sigset(int, void (*)(int)))(int);
1.120 +IMPORT_C void (*signal(int, void (*)(int)))(int);
1.121 +IMPORT_C int sigpending(sigset_t *set);
1.122 +IMPORT_C int sigignore(int sig);
1.123 +IMPORT_C void psignal(int sig, const char *s);
1.124 +
1.125 +IMPORT_C int sigenable();
1.126 +
1.127 +#endif
1.128 __END_DECLS
1.129
1.130 #endif /* !_SIGNAL_H_ */