From 8a854ac508a279317fc5f4d898134d83faad8b3f Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 28 Oct 2013 18:34:31 +0800 Subject: [PATCH] Kernel - Renamed signal.h to avoid collision in AcessNative --- KernelLand/Kernel/arch/x86/irq.c | 3 +-- KernelLand/Kernel/drv/pty.c | 2 +- KernelLand/Kernel/include/logdebug.h | 5 +++++ KernelLand/Kernel/include/{signal.h => posix_signals.h} | 0 KernelLand/Kernel/include/threads.h | 2 +- KernelLand/Kernel/include/threads_int.h | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) rename KernelLand/Kernel/include/{signal.h => posix_signals.h} (100%) 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/signal.h b/KernelLand/Kernel/include/posix_signals.h similarity index 100% rename from KernelLand/Kernel/include/signal.h rename to KernelLand/Kernel/include/posix_signals.h 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; -- 2.20.1