*/
int IRQ_AddHandler( int Num, void (*Callback)(int, void*), void *Ptr )
{
- int i;
- for( i = 0; i < MAX_CALLBACKS_PER_IRQ; i++ )
+ for( int i = 0; i < MAX_CALLBACKS_PER_IRQ; i++ )
{
if( gIRQ_Handlers[Num][i] == NULL )
{
#include <modules.h>
#include <rwlock.h>
#include <mutex.h>
-#include <signal.h>
+#include <posix_signals.h>
// === CONSTANTS ===
#define OUTPUT_RINGBUFFER_LEN 1024 // Number of bytes in output queue before client blocks
#include <stdarg.h>
+#ifndef NORETURN
+#define NORETURN __attribute__((noreturn))
+#endif
+
// --- Logging ---
/**
* \name Logging to kernel ring buffer
extern void Debug_Log(const char *FuncName, const char *Fmt, ...);
extern void Debug_Leave(const char *FuncName, char RetType, ...);
extern void Debug_HexDump(const char *Header, const void *Data, size_t Length);
+
#define UNIMPLEMENTED() Warning("'%s' unimplemented", __func__)
#if DEBUG
# define ENTER(_types...) Debug_Enter((char*)__func__, _types)
--- /dev/null
+/*
+ * Acess2 Kernel
+ * Signal List
+ */
+#ifndef _SIGNAL_H_
+#define _SIGNAL_H_
+
+#define SIG_DFL NULL
+
+enum eSignals {
+ SIGNONE = 0, // No signal
+ SIGHUP = 1,
+ SIGINT = 2, // C
+ SIGQUIT = 3, // POSIX
+ SIGILL = 4, // C
+ SIGTRAP = 5, // POSIX
+ SIGABRT = 6, // C?
+ SIGBUS = 7, // ?
+ SIGFPE = 8, // C
+ SIGKILL = 9, // POSIX
+ SIGUSR1 = 10,
+ SIGSEGV = 11, // C
+ SIGUSR2 = 12,
+ SIGPIPE = 13, //
+ SIGALRM = 14,
+ SIGTERM = 15,
+ _SIG16 = 16,
+ SIGCHLD = 17,
+ SIGCONT = 18,
+ SIGSTOP = 19,
+ NSIGNALS
+};
+
+extern void Threads_PostSignal(int SigNum);
+extern void Threads_SignalGroup(tPGID PGID, int SignalNum);
+
+#endif
+++ /dev/null
-/*
- * Acess2 Kernel
- * Signal List
- */
-#ifndef _SIGNAL_H_
-#define _SIGNAL_H_
-
-#define SIG_DFL NULL
-
-enum eSignals {
- SIGNONE = 0, // No signal
- SIGHUP = 1,
- SIGINT = 2, // C
- SIGQUIT = 3, // POSIX
- SIGILL = 4, // C
- SIGTRAP = 5, // POSIX
- SIGABRT = 6, // C?
- SIGBUS = 7, // ?
- SIGFPE = 8, // C
- SIGKILL = 9, // POSIX
- SIGUSR1 = 10,
- SIGSEGV = 11, // C
- SIGUSR2 = 12,
- SIGPIPE = 13, //
- SIGALRM = 14,
- SIGTERM = 15,
- _SIG16 = 16,
- SIGCHLD = 17,
- SIGCONT = 18,
- SIGSTOP = 19,
- NSIGNALS
-};
-
-extern void Threads_PostSignal(int SigNum);
-extern void Threads_SignalGroup(tPGID PGID, int SignalNum);
-
-#endif
#define _THREADS_H_
#include <arch.h>
-#include <signal.h>
+#include <posix_signals.h>
//#include <proc.h>
enum eFaultNumbers
#include <threads.h>
#include <proc.h>
#include <timers_int.h>
-#include <signal.h>
+#include <posix_signals.h>
typedef struct sProcess tProcess;