From: John Hodge Date: Mon, 28 Oct 2013 10:34:31 +0000 (+0800) Subject: Kernel - Renamed signal.h to avoid collision in AcessNative X-Git-Tag: rel0.15~103 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=8a854ac508a279317fc5f4d898134d83faad8b3f;p=tpg%2Facess2.git Kernel - Renamed signal.h to avoid collision in AcessNative --- diff --git a/KernelLand/Kernel/arch/x86/irq.c b/KernelLand/Kernel/arch/x86/irq.c index 5230f214..6ec3c2f3 100644 --- a/KernelLand/Kernel/arch/x86/irq.c +++ b/KernelLand/Kernel/arch/x86/irq.c @@ -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 ) { diff --git a/KernelLand/Kernel/drv/pty.c b/KernelLand/Kernel/drv/pty.c index 2ba10980..a2639bdc 100644 --- a/KernelLand/Kernel/drv/pty.c +++ b/KernelLand/Kernel/drv/pty.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include // === CONSTANTS === #define OUTPUT_RINGBUFFER_LEN 1024 // Number of bytes in output queue before client blocks diff --git a/KernelLand/Kernel/include/logdebug.h b/KernelLand/Kernel/include/logdebug.h index 340dda9b..987a6a89 100644 --- a/KernelLand/Kernel/include/logdebug.h +++ b/KernelLand/Kernel/include/logdebug.h @@ -10,6 +10,10 @@ #include +#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 index 00000000..b200634d --- /dev/null +++ b/KernelLand/Kernel/include/posix_signals.h @@ -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 index b200634d..00000000 --- a/KernelLand/Kernel/include/signal.h +++ /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 diff --git a/KernelLand/Kernel/include/threads.h b/KernelLand/Kernel/include/threads.h index 6382cf00..ed90d0bb 100644 --- a/KernelLand/Kernel/include/threads.h +++ b/KernelLand/Kernel/include/threads.h @@ -5,7 +5,7 @@ #define _THREADS_H_ #include -#include +#include //#include enum eFaultNumbers diff --git a/KernelLand/Kernel/include/threads_int.h b/KernelLand/Kernel/include/threads_int.h index 5706a356..4b4641ce 100644 --- a/KernelLand/Kernel/include/threads_int.h +++ b/KernelLand/Kernel/include/threads_int.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include typedef struct sProcess tProcess;