libc: Document the functions in luna.h
This commit is contained in:
parent
6aabe19fb4
commit
f44411aa46
@ -9,8 +9,13 @@ extern "C"
|
|||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Returns the current program's thread identifier. */
|
||||||
pid_t gettid();
|
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);
|
noreturn void __luna_abort(const char* message);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#define noreturn __attribute__((noreturn))
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
pid_t gettid()
|
pid_t gettid()
|
||||||
@ -21,7 +19,7 @@ extern "C"
|
|||||||
|
|
||||||
noreturn void __luna_abort(const char* message)
|
noreturn void __luna_abort(const char* message)
|
||||||
{
|
{
|
||||||
fwrite(message, strlen(message), 1, stdout);
|
fputs(message, stderr);
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user