Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21986 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+13
-21
@@ -1,8 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2007, Haiku, Inc. All Rights Reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
#ifndef _SIGNAL_H_
|
#ifndef _SIGNAL_H_
|
||||||
#define _SIGNAL_H_
|
#define _SIGNAL_H_
|
||||||
/*
|
|
||||||
** Distributed under the terms of the OpenBeOS License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -59,9 +60,7 @@ struct sigaction {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/* values for sa_flags */
|
||||||
* values for sa_flags
|
|
||||||
*/
|
|
||||||
#define SA_NOCLDSTOP 0x01
|
#define SA_NOCLDSTOP 0x01
|
||||||
#define SA_ONESHOT 0x02
|
#define SA_ONESHOT 0x02
|
||||||
#define SA_NOMASK 0x04
|
#define SA_NOMASK 0x04
|
||||||
@@ -73,9 +72,7 @@ struct sigaction {
|
|||||||
#define SA_SIGINFO 0x40
|
#define SA_SIGINFO 0x40
|
||||||
#define SA_NOCLDWAIT 0x80
|
#define SA_NOCLDWAIT 0x80
|
||||||
|
|
||||||
/*
|
/* values for ss_flags */
|
||||||
* values for ss_flags
|
|
||||||
*/
|
|
||||||
#define SS_ONSTACK 0x1
|
#define SS_ONSTACK 0x1
|
||||||
#define SS_DISABLE 0x2
|
#define SS_DISABLE 0x2
|
||||||
|
|
||||||
@@ -96,14 +93,11 @@ typedef struct sigstack {
|
|||||||
void *ss_sp;
|
void *ss_sp;
|
||||||
} sigstack;
|
} sigstack;
|
||||||
|
|
||||||
/*
|
/* for the 'how' arg of sigprocmask() */
|
||||||
* for the 'how' arg of sigprocmask()
|
|
||||||
*/
|
|
||||||
#define SIG_BLOCK 1
|
#define SIG_BLOCK 1
|
||||||
#define SIG_UNBLOCK 2
|
#define SIG_UNBLOCK 2
|
||||||
#define SIG_SETMASK 3
|
#define SIG_SETMASK 3
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The list of all defined signals:
|
* The list of all defined signals:
|
||||||
*
|
*
|
||||||
@@ -143,7 +137,6 @@ typedef struct sigstack {
|
|||||||
|
|
||||||
#define SIGBUS SIGSEGV /* for old style code */
|
#define SIGBUS SIGSEGV /* for old style code */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Signal numbers 30-32 are currently free but may be used in future
|
* Signal numbers 30-32 are currently free but may be used in future
|
||||||
* releases. Use them at your own peril (if you do use them, at least
|
* releases. Use them at your own peril (if you do use them, at least
|
||||||
@@ -182,12 +175,10 @@ int sigismember(const sigset_t *set, int signo);
|
|||||||
const char *strsignal(int sig);
|
const char *strsignal(int sig);
|
||||||
|
|
||||||
void set_signal_stack(void *ptr, size_t size);
|
void set_signal_stack(void *ptr, size_t size);
|
||||||
int sigaltstack(const stack_t *ss, stack_t *oss); /* XXXdbg */
|
int sigaltstack(const stack_t *ss, stack_t *oss);
|
||||||
|
|
||||||
/*
|
/* pthread extension : equivalent of sigprocmask() */
|
||||||
* pthread extension : equivalent of sigprocmask()
|
int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
|
||||||
*/
|
|
||||||
extern int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
|
|
||||||
|
|
||||||
extern inline int
|
extern inline int
|
||||||
sigismember(const sigset_t *set, int sig)
|
sigismember(const sigset_t *set, int sig)
|
||||||
@@ -253,7 +244,7 @@ sigdelset(sigset_t *set, int sig)
|
|||||||
*
|
*
|
||||||
* The two additional arguments available to the signal handler are extensions
|
* The two additional arguments available to the signal handler are extensions
|
||||||
* to the Posix standard. This feature was introduced by the BeOS and retained
|
* to the Posix standard. This feature was introduced by the BeOS and retained
|
||||||
* by OpenBeOS. However, to remain compatible with Posix and ANSI C, the type
|
* by Haiku. However, to remain compatible with Posix and ANSI C, the type
|
||||||
* of the sa_handler field is defined as 'sig_func_t'. This requires the handler
|
* of the sa_handler field is defined as 'sig_func_t'. This requires the handler
|
||||||
* to be cast when assigned to the sa_handler field, as in the example above.
|
* to be cast when assigned to the sa_handler field, as in the example above.
|
||||||
*
|
*
|
||||||
@@ -261,7 +252,7 @@ sigdelset(sigset_t *set, int sig)
|
|||||||
* This is because they expect a "this" pointer as the first argument.
|
* This is because they expect a "this" pointer as the first argument.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* The 3 arguments that OpenBeOS provides to signal handlers are as follows:
|
* The 3 arguments that Haiku provides to signal handlers are as follows:
|
||||||
*
|
*
|
||||||
* - The first argument is the (usual) signal number.
|
* - The first argument is the (usual) signal number.
|
||||||
*
|
*
|
||||||
@@ -287,6 +278,7 @@ sigdelset(sigset_t *set, int sig)
|
|||||||
|
|
||||||
typedef struct vregs vregs;
|
typedef struct vregs vregs;
|
||||||
|
|
||||||
|
// TODO: move those into an architecture specific header
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
struct vregs
|
struct vregs
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user