diff --git a/libs/libc/include/luna.h b/libs/libc/include/luna.h index ba49d87c..648398f7 100644 --- a/libs/libc/include/luna.h +++ b/libs/libc/include/luna.h @@ -9,8 +9,13 @@ extern "C" { #endif + /* Returns the current program's thread identifier. */ pid_t gettid(); - unsigned int msleep(unsigned int); + + /* Sleeps for ms milliseconds. */ + unsigned int msleep(unsigned int ms); + + /* Prints a message to standard error and aborts the program. */ noreturn void __luna_abort(const char* message); #ifdef __cplusplus diff --git a/libs/libc/src/luna.cpp b/libs/libc/src/luna.cpp index 7d031cdb..6f760571 100644 --- a/libs/libc/src/luna.cpp +++ b/libs/libc/src/luna.cpp @@ -5,8 +5,6 @@ #include #include -#define noreturn __attribute__((noreturn)) - extern "C" { pid_t gettid() @@ -21,7 +19,7 @@ extern "C" noreturn void __luna_abort(const char* message) { - fwrite(message, strlen(message), 1, stdout); + fputs(message, stderr); abort(); } } \ No newline at end of file