#ifndef __SIGNAL_H
#define __SIGNAL_H
+#define SIGHWINT 0 /* Corax specific: hardware interrupt signal */
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
/* FIXME: move definition of clock_t into the proper header file */
typedef unsigned int clock_t;
-/* FIXME: add the correct definition for sigval_t and sigset_t */
-typedef unsigned int sigval_t;
-typedef unsigned int sigset_t;
+typedef struct {
+ unsigned long int val[1024 / 8 * sizeof(unsigned long int)];
+} sigset_t;
+
+typedef union {
+ int sival_int;
+ void *sival_void;
+} sigval_t;
struct siginfo {
int si_signo;
};
struct sigaction {
- void (*sa_handler)(int);
- void (*sa_sigaction)(int, siginfo_t*, void*);
+ union {
+ void (*__sa_handler)(int);
+ void (*__sa_sigaction)(int, siginfo_t*, void*);
+ } __sigaction_u;
sigset_t sa_mask;
int sa_flags;
void (*sa_restorer)(void);
};
+#define sa_handler __sigaction_u.__sa_handler
+#define sa_sigaction __sigaction_u.__sa_sigaction
+
typedef void (*sighandler_t)(int);
#define SIG_IGN ((sighandler_t)0x1) /* "ignore" handler */
#define SIG_DFL ((sighandler_t)0x0) /* default handler */
+extern int sigaction(int, const struct sigaction*, struct sigaction*);
+
#endif /* __ASSEMBLY_SOURCE */
#endif /* __SIGNAL_H */