epoc32/include/libc/sys/signal.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* 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
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
williamr@2
    23
/**
williamr@2
    24
 @file
williamr@2
    25
 @publishedAll
williamr@2
    26
 @released
williamr@2
    27
*/
williamr@2
    28
williamr@2
    29
#ifndef _SYS_SIGNAL_H
williamr@2
    30
#define _SYS_SIGNAL_H
williamr@2
    31
williamr@2
    32
#ifndef _STRICT_ANSI
williamr@2
    33
williamr@2
    34
typedef unsigned long sigset_t;
williamr@2
    35
williamr@2
    36
struct sigaction 
williamr@2
    37
{
williamr@2
    38
	void (*sa_handler)();
williamr@2
    39
	sigset_t sa_mask;
williamr@2
    40
	int sa_flags;
williamr@2
    41
};
williamr@2
    42
williamr@2
    43
#define SA_NOCLDSTOP 1	/* only value supported now for sa_flags */
williamr@2
    44
#define SIG_SETMASK 0	/* set mask with sigprocmask() */
williamr@2
    45
#define SIG_BLOCK 1	/* set of signals to block */
williamr@2
    46
#define SIG_UNBLOCK 2	/* set of signals to, well, unblock */
williamr@2
    47
williamr@2
    48
williamr@2
    49
/**
williamr@2
    50
These depend upon the type of sigset_t, which right now 
williamr@2
    51
is always a long.. They're in the POSIX namespace, but
williamr@2
    52
are not ANSI. 
williamr@2
    53
*/
williamr@2
    54
#define sigaddset(what,sig) (*(what) |= (1<<(sig)))
williamr@2
    55
#define sigemptyset(what)   (*(what) = 0)
williamr@2
    56
williamr@2
    57
int sigprocmask (int how, const sigset_t *a, sigset_t *b);
williamr@2
    58
#endif /* _STRICT_ANSI */
williamr@2
    59
williamr@2
    60
williamr@2
    61
#define	SIGHUP	1	/* hangup */
williamr@2
    62
#define	SIGINT	2	/* interrupt */
williamr@2
    63
#define	SIGQUIT	3	/* quit */
williamr@2
    64
#define	SIGILL	4	/* illegal instruction (not reset when caught) */
williamr@2
    65
#define	SIGTRAP	5	/* trace trap (not reset when caught) */
williamr@2
    66
#define	SIGIOT	6	/* IOT instruction */
williamr@2
    67
#define	SIGABRT 6	/* used by abort, replace SIGIOT in the future */
williamr@2
    68
#define	SIGEMT	7	/* EMT instruction */
williamr@2
    69
#define	SIGFPE	8	/* floating point exception */
williamr@2
    70
#define	SIGKILL	9	/* kill (cannot be caught or ignored) */
williamr@2
    71
#define	SIGBUS	10	/* bus error */
williamr@2
    72
#define	SIGSEGV	11	/* segmentation violation */
williamr@2
    73
#define	SIGSYS	12	/* bad argument to system call */
williamr@2
    74
#define	SIGPIPE	13	/* write on a pipe with no one to read it */
williamr@2
    75
#define	SIGALRM	14	/* alarm clock */
williamr@2
    76
#define	SIGTERM	15	/* software termination signal from kill */
williamr@2
    77
#define	SIGUSR1	16
williamr@2
    78
#define SIGUSR2	17
williamr@2
    79
#define SIGCLD	18
williamr@2
    80
#define	SIGPWR	19
williamr@2
    81
#define SIGWINCH 20
williamr@2
    82
#define	SIGPOLL	22	/* 20 for x.out binaries!!!! */
williamr@2
    83
#define	SIGSTOP	23	/* sendable stop signal not from tty */
williamr@2
    84
#define	SIGTSTP	24	/* stop signal from tty */
williamr@2
    85
#define	SIGCONT	25	/* continue a stopped process */
williamr@2
    86
#define	SIGTTIN	26	/* to readers pgrp upon background tty read */
williamr@2
    87
#define	SIGTTOU	27	/* like TTIN for output if (tp->t_local&LTOSTOP) */
williamr@2
    88
#define NSIG	28	
williamr@2
    89
williamr@2
    90
#endif /* _SYS_SIGNAL_H */