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)/
#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
ENFILE, // Too many open files
ENOTDIR, // Not a directory
EIO, // IO Error
+ EINTR, // Operation interrupted (signal)
EALREADY, // Operation was a NOP
EINTERNAL, // Internal Error
};
-enum {
+enum eThreadStatus {
THREAD_STAT_NULL, // Invalid process
THREAD_STAT_ACTIVE, // Running and schedulable process
THREAD_STAT_SLEEPING, // Message Sleep