2022-10-02 16:10:53 +00:00
|
|
|
#ifndef _LUNA_H
|
|
|
|
#define _LUNA_H
|
|
|
|
|
2022-10-04 17:11:54 +00:00
|
|
|
#include <bits/macros.h>
|
2022-10-02 16:10:53 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2022-10-12 09:54:29 +00:00
|
|
|
/* Returns the current program's thread identifier. */
|
2022-10-15 09:39:13 +00:00
|
|
|
pid_t gettid(void);
|
2022-10-12 09:54:29 +00:00
|
|
|
|
|
|
|
/* Sleeps for ms milliseconds. */
|
|
|
|
unsigned int msleep(unsigned int ms);
|
|
|
|
|
|
|
|
/* Prints a message to standard error and aborts the program. */
|
2022-10-15 07:52:37 +00:00
|
|
|
__lc_noreturn void __luna_abort(const char* message);
|
2022-10-02 16:10:53 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define NOT_IMPLEMENTED(message) __luna_abort("not implemented: " message "\n")
|
|
|
|
|
|
|
|
#endif
|