Kernel - Renamed signal.h to avoid collision in AcessNative
authorJohn Hodge <[email protected]>
Mon, 28 Oct 2013 10:34:31 +0000 (18:34 +0800)
committerJohn Hodge <[email protected]>
Mon, 28 Oct 2013 10:34:31 +0000 (18:34 +0800)
KernelLand/Kernel/arch/x86/irq.c
KernelLand/Kernel/drv/pty.c
KernelLand/Kernel/include/logdebug.h
KernelLand/Kernel/include/posix_signals.h [new file with mode: 0644]
KernelLand/Kernel/include/signal.h [deleted file]
KernelLand/Kernel/include/threads.h
KernelLand/Kernel/include/threads_int.h

index 5230f21..6ec3c2f 100644 (file)
@@ -58,8 +58,7 @@ void IRQ_Handler(tRegs *Regs)
  */
 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 )
                {
index 2ba1098..a2639bd 100644 (file)
@@ -13,7 +13,7 @@
 #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
index 340dda9..987a6a8 100644 (file)
 
 #include <stdarg.h>
 
+#ifndef NORETURN
+#define NORETURN       __attribute__((noreturn))
+#endif
+
 // --- Logging ---
 /**
  * \name Logging to kernel ring buffer
@@ -43,6 +47,7 @@ extern void   Debug_Enter(const char *FuncName, const char *ArgTypes, ...);
 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)
diff --git a/KernelLand/Kernel/include/posix_signals.h b/KernelLand/Kernel/include/posix_signals.h
new file mode 100644 (file)
index 0000000..b200634
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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
diff --git a/KernelLand/Kernel/include/signal.h b/KernelLand/Kernel/include/signal.h
deleted file mode 100644 (file)
index b200634..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
index 6382cf0..ed90d0b 100644 (file)
@@ -5,7 +5,7 @@
 #define _THREADS_H_
 
 #include <arch.h>
-#include <signal.h>
+#include <posix_signals.h>
 //#include <proc.h>
 
 enum eFaultNumbers
index 5706a35..4b4641c 100644 (file)
@@ -12,7 +12,7 @@
 #include <threads.h>
 #include <proc.h>
 #include <timers_int.h>
-#include <signal.h>
+#include <posix_signals.h>
 
 typedef struct sProcess        tProcess;
 

UCC git Repository :: git.ucc.asn.au