summaryrefslogtreecommitdiffstats
path: root/lib/libjove/syscall/invoke.c
blob: e673623769f8dc46cb788f8e1d03a78f83c35095 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <syscall.h>
#include <kernel/syscall.h>
#include <jove.h>

int
_syscall_invoke(void)
{
    register uint64_t box  asm ("rdi") = _syscall_message_box;
    register uint64_t call asm ("rsi") = SYSCALL_INVOKE;

    int status = 0;
    __asm__ volatile("syscall": "=a"(status) :: "memory");
    return status;
}