vdso
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include <zinnia/thread.h>
|
||||
#include <kernel/vdso.h>
|
||||
|
||||
zn_status_t zn_thread_create(
|
||||
zn_handle_t ns,
|
||||
const char* name,
|
||||
size_t name_len,
|
||||
enum zn_thread_flags flags,
|
||||
zn_handle_t* out
|
||||
) {
|
||||
return zn_syscall5(ns, name, name_len, flags, out, ZN_SYSCALL_THREAD_CREATE);
|
||||
}
|
||||
|
||||
VDSO_SYMBOL(zn_thread_create);
|
||||
|
||||
zn_status_t zn_thread_start(zn_handle_t thread, uintptr_t ip, uintptr_t sp, uintptr_t arg) {
|
||||
return zn_syscall4(thread, ip, sp, arg, ZN_SYSCALL_THREAD_START);
|
||||
}
|
||||
|
||||
VDSO_SYMBOL(zn_thread_start);
|
||||
|
||||
void zn_thread_exit(void) {
|
||||
zn_syscall0(ZN_SYSCALL_THREAD_EXIT);
|
||||
}
|
||||
|
||||
VDSO_SYMBOL(zn_thread_exit);
|
||||
Reference in New Issue
Block a user