/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1982 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#ifndef __sys_signal_h
#define __sys_signal_h
#pragma ident "%Z%%M% %I% %E% SMI"
#include <vm/faultcode.h>
/*
* If any signal defines (SIG*) are added, deleted, or changed, the same
*/
/* codes from 0x80 to 0xff are software traps */
/*
* The codes for SIGBUS and SIGSEGV are described in <vm/faultcode.h>
*/
/*
* The BUS_CODE(code) will be one of the above. In the BUS_OBJERR case,
* doing a BUS_ERRNO(code) gives an errno value reported by the underlying
* file object mapped at the fault address. Note that this appears to be
* duplicated with the segmentation fault case below -- unfortunate, since
* the specification has always claimed that such errors produce SIGBUS.
* The segmentation cases are left defined as a transition aid.
*/
/*
* The SEGV_CODE(code) will be SEGV_NOMAP, SEGV_PROT, or SEGV_OBJERR.
* In the SEGV_OBJERR case, doing a SEGV_ERRNO(code) gives an errno value
* reported by the underlying file object mapped at the fault address.
*/
/*
* If addr cannot be computed it is set to SIG_NOADDR.
*/
#define SIG_NOADDR ((char *)~0)
void (*signal())();
/*
* Define BSD 4.1 reliable signals for SVID compatibility.
* These functions may go away in a future release.
*/
void (*sigset())();
int sighold();
int sigrelse();
int sigignore();
#endif /* !KERNEL && !LOCORE */
#ifndef LOCORE
/*
* Signal vector "template" used in sigvec call.
*/
struct sigvec {
};
/*
* If any SA_NOCLDSTOP or SV_NOCLDSTOP is change, the same
*/
/*
* Structure used in sigstack call.
*/
struct sigstack {
};
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
* execution of the signal handler. It is also made available
* to the handler to allow it to properly restore state if
* a non-standard exit is performed.
*/
struct sigcontext {
int sc_o0;
};
#endif /* !LOCORE */
/*
* If SIG_ERR, SIG_DFL, SIG_IGN, or SIG_HOLD are changed, the same changes
*/
#define SIG_DFL (void (*)())0
/*
* Macro for converting signal number to a mask suitable for sigblock().
*/
/*
* signals that can't caught, blocked, or ignored
*/
/*
* If SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK are changed, the same changes
*/
/*
* If changes are made to sigset_t or struct sigaction, the same changes
*/
#include <sys/stdtypes.h>
struct sigaction {
void (*sa_handler)();
int sa_flags;
};
/*
* If changes are made to the function prototypes, the same changes
*/
void (*signal())();
int kill(/* pid_t p, int sig */);
int sigaction(/* int signo,
struct sigaction *act, struct sigaction *oldact */);
int sigaddset(/* sigset_t *mask, int signo */);
int sigdelset(/* sigset_t *mask, int signo */);
int sigemptyset(/* sigset_t *mask */);
int sigfillset(/* sigset_t *mask */);
int sigismember(/* sigset_t *mask, int signo */);
int sigpending(/* sigset_t *set */);
int sigprocmask(/* int how, sigset_t *set, *oldset */);
int sigsuspend(/* sigset_t *mask */);
#endif /* !LOCORE && !KERNEL */
#endif /* !__sys_signal_h */