epoc32/include/libc/sys/signal.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/libc/sys/signal.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/libc/sys/signal.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,90 @@
     1.4 -signal.h
     1.5 +/*
     1.6 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +
    1.25 +
    1.26 +
    1.27 +/**
    1.28 + @file
    1.29 + @publishedAll
    1.30 + @released
    1.31 +*/
    1.32 +
    1.33 +#ifndef _SYS_SIGNAL_H
    1.34 +#define _SYS_SIGNAL_H
    1.35 +
    1.36 +#ifndef _STRICT_ANSI
    1.37 +
    1.38 +typedef unsigned long sigset_t;
    1.39 +
    1.40 +struct sigaction 
    1.41 +{
    1.42 +	void (*sa_handler)();
    1.43 +	sigset_t sa_mask;
    1.44 +	int sa_flags;
    1.45 +};
    1.46 +
    1.47 +#define SA_NOCLDSTOP 1	/* only value supported now for sa_flags */
    1.48 +#define SIG_SETMASK 0	/* set mask with sigprocmask() */
    1.49 +#define SIG_BLOCK 1	/* set of signals to block */
    1.50 +#define SIG_UNBLOCK 2	/* set of signals to, well, unblock */
    1.51 +
    1.52 +
    1.53 +/**
    1.54 +These depend upon the type of sigset_t, which right now 
    1.55 +is always a long.. They're in the POSIX namespace, but
    1.56 +are not ANSI. 
    1.57 +*/
    1.58 +#define sigaddset(what,sig) (*(what) |= (1<<(sig)))
    1.59 +#define sigemptyset(what)   (*(what) = 0)
    1.60 +
    1.61 +int sigprocmask (int how, const sigset_t *a, sigset_t *b);
    1.62 +#endif /* _STRICT_ANSI */
    1.63 +
    1.64 +
    1.65 +#define	SIGHUP	1	/* hangup */
    1.66 +#define	SIGINT	2	/* interrupt */
    1.67 +#define	SIGQUIT	3	/* quit */
    1.68 +#define	SIGILL	4	/* illegal instruction (not reset when caught) */
    1.69 +#define	SIGTRAP	5	/* trace trap (not reset when caught) */
    1.70 +#define	SIGIOT	6	/* IOT instruction */
    1.71 +#define	SIGABRT 6	/* used by abort, replace SIGIOT in the future */
    1.72 +#define	SIGEMT	7	/* EMT instruction */
    1.73 +#define	SIGFPE	8	/* floating point exception */
    1.74 +#define	SIGKILL	9	/* kill (cannot be caught or ignored) */
    1.75 +#define	SIGBUS	10	/* bus error */
    1.76 +#define	SIGSEGV	11	/* segmentation violation */
    1.77 +#define	SIGSYS	12	/* bad argument to system call */
    1.78 +#define	SIGPIPE	13	/* write on a pipe with no one to read it */
    1.79 +#define	SIGALRM	14	/* alarm clock */
    1.80 +#define	SIGTERM	15	/* software termination signal from kill */
    1.81 +#define	SIGUSR1	16
    1.82 +#define SIGUSR2	17
    1.83 +#define SIGCLD	18
    1.84 +#define	SIGPWR	19
    1.85 +#define SIGWINCH 20
    1.86 +#define	SIGPOLL	22	/* 20 for x.out binaries!!!! */
    1.87 +#define	SIGSTOP	23	/* sendable stop signal not from tty */
    1.88 +#define	SIGTSTP	24	/* stop signal from tty */
    1.89 +#define	SIGCONT	25	/* continue a stopped process */
    1.90 +#define	SIGTTIN	26	/* to readers pgrp upon background tty read */
    1.91 +#define	SIGTTOU	27	/* like TTIN for output if (tp->t_local&LTOSTOP) */
    1.92 +#define NSIG	28	
    1.93 +
    1.94 +#endif /* _SYS_SIGNAL_H */