about summary refs log tree commit diff stats
path: root/src/os/os_linux.c
blob: b09bcc35c751786cc42cbec00e64df8fa8194547 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <sys/syscall.h>
#include <sched.h>
#include <unistd.h>
#include <stdint.h>

#include "os.h"
#include "signals.h"

int GetTID(void)
{
    return syscall(SYS_gettid);
}

int SchedYield(void)
{
    return sched_yield();
}

void EmitSignal(void* emu, int sig, void* addr, int code)
{
    return emit_signal((x64emu_t*)emu, sig, addr, code);
}

void EmitDiv0(void* emu, void* addr, int code)
{
    return emit_div0((x64emu_t*)emu, addr, code);
}

void EmitInterruption(void* emu, int num, void* addr)
{
    return emit_interruption((x64emu_t*)emu, num, addr);
}