BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / blob / master / include / sys / signal.h

// Related

Nucleus

Barry System headers (remove libc dependency) 18495cf (3 years, 2 months ago)
#ifndef _SYS_SIGNAL_H
#define _SYS_SIGNAL_H

#include <sys/types.h>

typedef unsigned long int __sigset_t;
#ifndef sigset_t
typedef __sigset_t sigset_t;
#endif
#ifndef sig_atomic_t
typedef int sig_atomic_t;
#endif

typedef void (*sighandler_t)(int);

#define SIG_ERR (sighandler_t) -1
#define SIG_IGNORE 0
#define SIG_DFL 1
#define SIG_BLOCK 2
#define SIG_UNBLOCK 3
#define SIG_SETMASK 4

#ifdef __cplusplus
extern "C" {
#endif

enum Signal {
	SIGHUP = 1,
	SIGINT,
	SIGQUIT,
	SIGILL,
	SIGABRT,
	SIGFPE,
	SIGKILL,
	SIGSEGV,
	SIGPIPE,
};

int tgkill(pid_t tgid, pid_t tid, int sig);
int kill(pid_t pid, int sig);
sighandler_t signal(int signum, sighandler_t handler);
int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);

#ifdef __cplusplus
}
#endif

#endif