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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#![allow(nonstandard_style)]

use crate::{kty};

pub use kty::gen::{
    __kernel_long_t, __kernel_ulong_t,
};

use core::sync::{atomic};

pub const USER_POINTER_ALIGN : usize = 8;
pub const BITS_PER_C_ULONG : usize = 64;

pub type c_long  = i64;
pub type c_ulong = u64;

pub type AtomicLong = atomic::AtomicI64;
pub type AtomicULong = atomic::AtomicU64;

pub type user_size_t = kty::c_ulong;

pub type __kernel_old_uid_t = kty::c_ushort;
pub type __kernel_old_gid_t = kty::c_ushort;
pub type __kernel_old_dev_t = kty::c_ulong;

pub const __NR_rt_sigaction      : usize = 13;
pub const __NR_rt_sigreturn      : usize = 15;
pub const __NR_ioctl             : usize = 16;
pub const __NR_readv             : usize = 19;
pub const __NR_writev            : usize = 20;
pub const __NR_recvfrom          : usize = 45;
pub const __NR_sendmsg           : usize = 46;
pub const __NR_recvmsg           : usize = 47;
pub const __NR_setsockopt        : usize = 54;
pub const __NR_getsockopt        : usize = 55;
pub const __NR_execve            : usize = 59;
pub const __NR_ptrace            : usize = 101;
pub const __NR_rt_sigpending     : usize = 127;
pub const __NR_rt_sigtimedwait   : usize = 128;
pub const __NR_rt_sigqueueinfo   : usize = 129;
pub const __NR_sigaltstack       : usize = 131;
pub const __NR_uselib            : usize = 134;
pub const __NR__sysctl           : usize = 156;
pub const __NR_create_module     : usize = 174;
pub const __NR_get_kernel_syms   : usize = 177;
pub const __NR_query_module      : usize = 178;
pub const __NR_nfsservctl        : usize = 180;
pub const __NR_set_thread_area   : usize = 205;
pub const __NR_io_setup          : usize = 206;
pub const __NR_io_submit         : usize = 209;
pub const __NR_get_thread_area   : usize = 211;
pub const __NR_epoll_ctl_old     : usize = 214;
pub const __NR_epoll_wait_old    : usize = 215;
pub const __NR_timer_create      : usize = 222;
pub const __NR_vserver           : usize = 236;
pub const __NR_mq_notify         : usize = 244;
pub const __NR_kexec_load        : usize = 246;
pub const __NR_waitid            : usize = 247;
pub const __NR_set_robust_list   : usize = 273;
pub const __NR_get_robust_list   : usize = 274;
pub const __NR_vmsplice          : usize = 278;
pub const __NR_move_pages        : usize = 279;
pub const __NR_preadv            : usize = 295;
pub const __NR_pwritev           : usize = 296;
pub const __NR_rt_tgsigqueueinfo : usize = 297;
pub const __NR_recvmmsg          : usize = 299;
pub const __NR_sendmmsg          : usize = 307;
pub const __NR_process_vm_readv  : usize = 310;
pub const __NR_process_vm_writev : usize = 311;
pub const __NR_execveat          : usize = 322;

//////////////////////////////////////
// arch/x86/include/uapi/asm/siginfo.h
//////////////////////////////////////

pub const __ARCH_SI_PREAMBLE_SIZE: usize = 4 * kty::BYTES_PER_INT;

pub use kty::gen::{
    __ARCH_SI_CLOCK_T,
};

///////////////////////////
// include/uapi/linux/elf.h
///////////////////////////

pub type ElfDyn  = kty::Elf64_Dyn;
pub type ElfRel  = kty::Elf64_Rel;
pub type ElfRela = kty::Elf64_Rela;
pub type ElfSym  = kty::Elf64_Sym;
pub type ElfEhdr = kty::Elf64_Ehdr;
pub type ElfPhdr = kty::Elf64_Phdr;
pub type ElfShdr = kty::Elf64_Shdr;
pub type ElfNhdr = kty::Elf64_Nhdr;