|
typedef struct path_t | path_t |
|
enum | os_access_t { eOsAccessMask = eOsAccessRead | eOsAccessWrite | eOsAccessTruncate
} |
| file access mode More...
|
|
enum | os_protect_t { eOsProtectMask = eOsProtectRead | eOsProtectWrite | eOsProtectExecute
} |
| file mapping memory protection More...
|
|
enum | os_dirent_t { eOsNodeCount
} |
| directory entry type More...
|
|
typedef typedefCT_BEGIN_API struct os_file_t | os_file_t |
| file handle More...
|
|
typedef int | os_exitcode_t |
| program exit code More...
|
|
typedef unsigned | os_status_t |
| thread return code More...
|
|
typedef size_t | os_thread_id_t |
| thread id More...
|
|
typedef void(* | os_symbol_t) (void) |
| function pointer used for shared library symbols rather than void* because casting a function pointer to void* is undefined behavior More...
|
|
typedef | STA_SUCCESS_TYPE (return==eOsSuccess) size_t os_error_t |
| error code More...
|
|
CT_OS_API void | os_init (void) |
| initialize the os api More...
|
|
CT_NORETURN CT_OS_API | os_exit (os_exitcode_t code) |
| exit the program More...
|
|
CT_NORETURN CT_OS_API | os_thread_exit (os_status_t status) |
| exit the current thread of execution More...
|
|
CT_OS_API os_thread_id_t | os_get_thread_id (void) |
| get the current thread id More...
|
|
CT_NORETURN CT_OS_API | os_abort (void) |
| abort the program More...
|
|
CT_NODISCARD CT_OS_API size_t | os_error_get_string (os_error_t error, STA_WRITES(size) char *buffer, size_t size) |
| convert an os error code to a string writes to a buffer rather than allocating. if size is 0, the function will return the number of characters needed to write the string. More...
|
|
CT_NODISCARD CT_OS_API size_t | os_cwd_get_string (STA_WRITES(size) char *buffer, size_t size) |
| get the current working directory More...
|
|
CT_NODISCARD STA_RET_STRING CT_OS_API char * | os_error_string (os_error_t error, arena_t *arena) |
| convert an os error code to a string More...
|
|
CT_OS_API char * | os_cwd_string (arena_t *arena) |
| get the current working directory More...
|
|
CT_OS_API os_error_t | os_getcwd (OUT_NOTNULL text_t *text, arena_t *arena) |
| get the current working directory More...
|
|
CT_NODISCARD CT_PUREFN CT_OS_API os_dirent_t | os_inode_type (const os_inode_t *node) |
| get the type of an inode More...
|
|
CT_NODISCARD STA_RET_STRING CT_PUREFN CT_OS_API const char * | os_inode_name (const os_inode_t *node) |
| get the name of an inode More...
|
|
CT_NODISCARD CT_CONSTFN STA_RET_STRING CT_OS_API const char * | os_dirent_string (os_dirent_t type) |
| get the string representation of a directory entry type More...
|
|
CT_NODISCARD CT_CONSTFN STA_RET_STRING CT_OS_API const char * | os_access_string (os_access_t access) |
| get the string representation of a file access mode More...
|
|
CT_NODISCARD CT_CONSTFN STA_RET_STRING CT_OS_API const char * | os_protect_string (os_protect_t protect) |
| get the string representation of a file mapping memory protection More...
|
|