2023-05-29 15:40:48 +00:00
|
|
|
// This file is part of noxos and licensed under the MIT open source license
|
|
|
|
|
|
|
|
#ifndef LIBC_SYSCALL_H
|
|
|
|
#define LIBC_SYSCALL_H
|
|
|
|
|
|
|
|
#include "public/nox/stdtypes.h"
|
|
|
|
#include "public/nox/string.h"
|
|
|
|
|
2023-05-29 16:17:23 +00:00
|
|
|
uint64_t nx_fs_open (string_t path, uint64_t len, uint64_t* fd);
|
|
|
|
uint64_t nx_fs_close (uint64_t fd);
|
|
|
|
uint64_t nx_fs_read (uint64_t fd, uint64_t offset, void* mem, uint64_t n);
|
|
|
|
uint64_t nx_fs_write (uint64_t fd, uint64_t offset, void* mem, uint64_t n);
|
|
|
|
uint64_t nx_fs_delete (string_t path, uint64_t len);
|
|
|
|
uint64_t nx_fs_list (string_t path, uint64_t len, void* mem, uint64_t* needed_mem);
|
|
|
|
uint64_t nx_fs_info (uint64_t fd, uint64_t attr, void* mem);
|
2023-05-29 15:40:48 +00:00
|
|
|
|
2023-05-29 16:17:23 +00:00
|
|
|
uint64_t nx_mem_alloc (void* addr, uint64_t n, uint64_t flags);
|
|
|
|
uint64_t nx_mem_free (void* addr, uint64_t n);
|
|
|
|
uint64_t nx_mem_label (void* addr, uint64_t len, uint64_t* fd);
|
|
|
|
uint64_t nx_mem_unlabel (uint64_t* fd);
|
2023-05-29 15:40:48 +00:00
|
|
|
|
2023-05-29 16:17:23 +00:00
|
|
|
uint64_t nx_proc_create (void* conf, uint64_t* pid);
|
|
|
|
uint64_t nx_proc_signal_send (uint64_t pid, uint64_t signal);
|
|
|
|
uint64_t nx_proc_signal_set_handler (uint64_t signal, void* handler);
|
|
|
|
uint64_t nx_proc_thread_create (void* addr, uint64_t* tid);
|
|
|
|
uint64_t nx_proc_thread_start (uint64_t tid);
|
|
|
|
uint64_t nx_proc_thread_pause (uint64_t tid);
|
|
|
|
uint64_t nx_proc_thread_kill (uint64_t tid);
|
|
|
|
|
2023-05-29 16:43:03 +00:00
|
|
|
uint64_t nx_drv_register (uint64_t fd);
|
|
|
|
uint64_t nx_drv_init (void* conf);
|
2023-05-29 16:17:23 +00:00
|
|
|
uint64_t nx_drv_create_command_buffer (void* addr, uint64_t len);
|
|
|
|
uint64_t nx_drv_flush_command_buffer (void* addr);
|
2023-05-29 15:40:48 +00:00
|
|
|
|
|
|
|
#endif //LIBC_SYSCALL_H
|