Fully support userland interrupt handler. Use fixed common abort handler.
This commit is contained in:
@@ -53,9 +53,9 @@ int exit()
|
||||
return syscall(SYSCALL_EXIT, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
int yield()
|
||||
int yield(task_yield_reason reason)
|
||||
{
|
||||
return syscall(SYSCALL_YIELD, 0, 0, 0, 0);
|
||||
return syscall(SYSCALL_YIELD, (uintptr_t)reason, 0, 0, 0);
|
||||
}
|
||||
|
||||
int kill(int pid)
|
||||
|
||||
@@ -44,6 +44,12 @@ typedef enum {
|
||||
SYS_STATE_SHOW_CPU_INFO,
|
||||
} sys_state_option;
|
||||
|
||||
typedef enum {
|
||||
SYS_TASK_YIELD_NO_REASON = 0x0,
|
||||
SYS_TASK_YIELD_FOREVER = 0x1,
|
||||
SYS_TASK_YIELD_BLOCK_IPC = 0x2,
|
||||
} task_yield_reason;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
uintptr_t memblock_start;
|
||||
@@ -58,7 +64,7 @@ typedef int (*ipc_write_fn)(struct Session* session, int fd, char* src, int offs
|
||||
|
||||
int spawn(struct Session* session, int fd, ipc_read_fn ipc_read, ipc_fsize_fn ipc_fsize, char* name, char** argv);
|
||||
int exit();
|
||||
int yield();
|
||||
int yield(task_yield_reason reason);
|
||||
int kill(int pid);
|
||||
int register_server(char* name);
|
||||
int session(char* path, int capacity, struct Session* user_session);
|
||||
|
||||
Reference in New Issue
Block a user