Support smp for imx6q-sabrelite.

This commit is contained in:
TXuian
2024-03-21 14:54:52 +08:00
parent 620965dc2c
commit 0f5527d73a
21 changed files with 257 additions and 57 deletions
@@ -58,6 +58,11 @@ int yield()
return syscall(SYSCALL_YIELD, 0, 0, 0, 0);
}
int kill(int pid)
{
return syscall(SYSCALL_KILL, (intptr_t)pid, 0, 0, 0);
}
int register_server(char* name)
{
return syscall(SYSCALL_SERVER, (intptr_t)name, 0, 0, 0);
@@ -30,6 +30,8 @@
#define SYSCALL_EXEC 9 // run elf using current task
#define SYSCALL_SYS_STATE 10 // run system state
#define SYSCALL_REGISTER_IRQ 11 //
#define SYSCALL_KILL 12 // kill the task by id
// clang-format on
typedef enum {
@@ -57,6 +59,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 kill(int pid);
int register_server(char* name);
int session(char* path, int capacity, struct Session* user_session);
int poll_session(struct Session* userland_session_arr, int arr_capacity);