blob: eb4235d23bda703c214f29dbb1dfadbfa966d0e8 (
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
33
34
35
36
37
38
39
|
#ifndef _JOVE_API_SYSCALL_H
#define _JOVE_API_SYSCALL_H 1
#include <stdint.h>
#include <stddef.h>
typedef intmax_t syscall_id_t;
static int __syscall(void *data)
{
intmax_t r;
__asm__ volatile(" \
movq %1, %%rdi; \
syscall; \
movq %%rax, %0"
: "=r"(r)
: "r"(data));
return r;
}
enum {
SC_DBG_LOGF = 0,
SC_EXIT
};
struct sc_dbg_log
{
syscall_id_t id;
size_t w;
const char *s;
};
struct sc_exit
{
syscall_id_t id;
int exit_code;
};
#endif
|