From: John Hodge Date: Sun, 2 Sep 2012 11:55:08 +0000 (+0800) Subject: Kernel - Misc X-Git-Tag: rel0.15~706^2~17 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=1ac0c6fd8af10ace17331b638a37698f586d04c9;p=tpg%2Facess2.git Kernel - Misc --- diff --git a/KernelLand/Kernel/Makefile b/KernelLand/Kernel/Makefile index 66eb9cdd..16d63b44 100644 --- a/KernelLand/Kernel/Makefile +++ b/KernelLand/Kernel/Makefile @@ -29,6 +29,7 @@ CFLAGS += -Wall -fno-stack-protector -Wstrict-prototypes -std=gnu99 -g CFLAGS += -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wuninitialized CFLAGS += -O3 LDFLAGS += -T arch/$(ARCHDIR)/link.ld -g +LIBGCC_PATH := $(shell $(CC) -print-libgcc-file-name) ifeq ($(PLATFORM),default) OBJDIR := obj-$(ARCH)/ diff --git a/KernelLand/Kernel/include/acess.h b/KernelLand/Kernel/include/acess.h index 1d062a5e..3abc49ab 100644 --- a/KernelLand/Kernel/include/acess.h +++ b/KernelLand/Kernel/include/acess.h @@ -15,6 +15,8 @@ #define PACKED __attribute__((packed)) //! Mark a function as not returning #define NORETURN __attribute__((noreturn)) +//! Mark a function that its return value should be used +#define WARN_UNUSED_RET __attribute__((warn_unused_result)) //! Mark a function (or variable) as deprecated #define DEPRECATED __attribute__((deprecated)) //! Mark a parameter as unused diff --git a/KernelLand/Kernel/include/errno.h b/KernelLand/Kernel/include/errno.h index a327cc00..31f68a0c 100644 --- a/KernelLand/Kernel/include/errno.h +++ b/KernelLand/Kernel/include/errno.h @@ -22,6 +22,7 @@ enum eErrorNums ENFILE, // Too many open files ENOTDIR, // Not a directory EIO, // IO Error + EINTR, // Operation interrupted (signal) EALREADY, // Operation was a NOP EINTERNAL, // Internal Error diff --git a/KernelLand/Kernel/include/threads_int.h b/KernelLand/Kernel/include/threads_int.h index 881db4ab..578fdcf1 100644 --- a/KernelLand/Kernel/include/threads_int.h +++ b/KernelLand/Kernel/include/threads_int.h @@ -102,7 +102,7 @@ struct sThread }; -enum { +enum eThreadStatus { THREAD_STAT_NULL, // Invalid process THREAD_STAT_ACTIVE, // Running and schedulable process THREAD_STAT_SLEEPING, // Message Sleep