libc: Document the functions in luna.h

This commit is contained in:
apio 2022-10-12 11:54:29 +02:00
parent 6aabe19fb4
commit f44411aa46
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -5,8 +5,6 @@
#include <sys/syscall.h>
#include <unistd.h>
#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();
}
}