summaryrefslogtreecommitdiff
path: root/os/indirect.h
blob: fba6b6be11fed8151e0242f1c9618a93d296f697 (plain)
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
40
#ifndef _INDIRECT_H_
#define _INDIRECT_H_

#include "syslet.h"

union indirect_params {
	struct {
		u32 flags;
	} file_flags;
	struct syslet_args syslet;
};

#ifdef __x86_64__
# define __NR_indirect 286
struct indirect_registers {
	u64 rax;
	u64 rdi;
	u64 rsi;
	u64 rdx;
	u64 r10;
	u64 r8;
	u64 r9;
};
#elif defined __i386__
# define __NR_indirect 325
struct indirect_registers {
	u32 eax;
	u32 ebx;
	u32 ecx;
	u32 edx;
	u32 esi;
	u32 edi;
	u32 ebp;
};
#endif

#define FILL_IN(var, values...) \
	  (var) = (struct indirect_registers) { values, }

#endif