libc: Document functions in headers #11

Merged
asleepymoon merged 12 commits from descriptive_headers into main 2022-10-12 10:11:45 +00:00
2 changed files with 7 additions and 4 deletions
Showing only changes of commit f44411aa46 - Show all commits

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();
}
}