6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
30
31
32
33
34
35
36
37
38
39
40
41
42
43
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
* OS specified! */
#ifndef KIplatform_posix
#define KIplatform_posix
#include <k/def.h>
#include <k/type.h>
enum posix_prot {
posix_prot_none = 0,
posix_prot_read = 1 << 0,
posix_prot_write = 1 << 1,
posix_prot_exec = 1 << 2
};
................................................................................
posix_flag_anonymous = 0x1000,
#endif
/* platform flags */
posix_flag_linux_hugetlb = 0x40000
};
/* platform types */
typedef s64 k_platform_syscall_return;
typedef u64 k_platform_syscall_error;
#if KVos == KA_os_lin
typedef long k_platform_syscall_arg;
................................................................................
#endif
struct k_platform_syscall_answer {
k_platform_syscall_return ret;
k_platform_syscall_error error;
};
#include <system_calls.h>
extern struct k_platform_syscall_answer
k_platform_syscall(enum k_platform_syscall call, u8 valency,
k_platform_syscall_arg args[]);
#endif
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
|
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
* OS specified! */
#ifndef KIplatform_posix
#define KIplatform_posix
#include <k/def.h>
#include <k/type.h>
#if (!defined(KFplatform_define_constants)) && \
(!defined(KFplatform_define_types)) && \
(!defined(KFplatform_define_funcs))
#define KFplatform_define_constants
#define KFplatform_define_types
#define KFplatform_define_funcs
#endif
#ifdef KFplatform_define_constants
enum posix_prot {
posix_prot_none = 0,
posix_prot_read = 1 << 0,
posix_prot_write = 1 << 1,
posix_prot_exec = 1 << 2
};
................................................................................
posix_flag_anonymous = 0x1000,
#endif
/* platform flags */
posix_flag_linux_hugetlb = 0x40000
};
#endif
#ifdef KFplatform_define_types
/* platform types */
typedef s64 k_platform_syscall_return;
typedef u64 k_platform_syscall_error;
#if KVos == KA_os_lin
typedef long k_platform_syscall_arg;
................................................................................
#endif
struct k_platform_syscall_answer {
k_platform_syscall_return ret;
k_platform_syscall_error error;
};
#endif
#if defined(KFplatform_define_constants) ||\
defined(KFplatform_define_funcs)
# include <system_calls.h>
#endif
#ifdef KFplatform_define_funcs
extern struct k_platform_syscall_answer
k_platform_syscall(enum k_platform_syscall call, u8 valency,
k_platform_syscall_arg args[]);
#endif
#endif
|