/*
Copyright (c) 1993 Xerox Corporation.  All rights reserved.
*/
/*
$Id$

$Date$
 */


#ifndef	←←PCR←signal←h
#define ←←PCR←signal←h 1

#include <sig/PCR←Sig.h>
#include <sys/types.h>

/*
    This is one of the few PCR posix headers than can't just include
      the corresponding host header, but the semantics of signals
      is quite a bit different, and many signals are not supported.
*/


#define PCR←SIG←DFL	((void (*)())(0))
#define PCR←SIG←IGN	((void (*)())(1))


#define PCR←SIG←SETMASK	0
#define PCR←SIG←BLOCK	1
#define PCR←SIG←UNBLOCK	2


extern int PCR←kill(pid←t p, int sig);


struct PCR←sigaction {
    void (*sa←handler)();
    PCR←sigset←t sa←mask;
    int sa←flags;
};

extern int PCR←sigaction(
    int signo,
    struct PCR←sigaction *act,
    struct PCR←sigaction *oldact
);


extern int PCR←sigpending(PCR←sigset←t *set);

extern int PCR←sigprocmask(int how, PCR←sigset←t *set, PCR←sigset←t *oldset);

extern int PCR←sigsuspend(PCR←sigset←t *mask);


#ifndef PCR←NO←RENAME

#   ifdef NSIG
#       error host signal.h included somehow ...
#   endif

/* required signals */

#   define SIGABRT	PCR←SIGABRT
#   define SIGALRM	PCR←SIGALRM
#   define SIGFPE	PCR←SIGFPE
#   define SIGHUP	PCR←SIGHUP
#   define SIGILL	PCR←SIGILL
#   define SIGINT	PCR←SIGINT
#   define SIGKILL	PCR←SIGKILL
#   define SIGPIPE	PCR←SIGPIPE
#   define SIGQUIT	PCR←SIGQUIT
#   define SIGSEGV	PCR←SIGSEGV
#   define SIGTERM	PCR←SIGTERM
#   define SIGUSR1	PCR←SIGUSR1
#   define SIGUSR2	PCR←SIGUSR2

/* job control signals -- not necessarily supported */

#   define SIGCHLD	PCR←SIGCHLD
#   define SIGCONT	PCR←SIGCONT
#   define SIGSTOP	PCR←SIGSTOP
#   define SIGTSTP	PCR←SIGTSTP
#   define SIGTTIN	PCR←SIGTTIN
#   define SIGTTOU	PCR←SIGTTOU

#   define NSIG		PCR←NSIGPOSIX

/* types */

#   define sigset←t PCR←sigset←t

#   define SIG←IGN	PCR←SIG←IGN
#   define SIG←DFL	PCR←SIG←DFL

#   define SIG←BLOCK	PCR←SIG←BLOCK
#   define SIG←UNBLOCK	PCR←SIG←UNBLOCK
#   define SIG←SETMASK	PCR←SIG←SETMASK

/* procs */

#   define kill PCR←kill
#   define sigaction PCR←sigaction

#   define sigaddset PCR←sigset←t←Add
#   define sigdelset PCR←sigset←t←Del
#   define sigemptyset PCR←sigset←t←SetEmpty
#   define sigfillset PCR←sigset←t←SetFull
#   define sigismember PCR←sigset←t←IsMember

#   define sigpending PCR←sigpending
#   define sigprocmask PCR←sigprocmask
#   define sigsuspend PCR←sigsuspend

#endif /* !PCR←NO←RENAME */


#endif /* !←←PCR←signal←h */

/*
$Log$
*/