-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: add linux compatibility layer
- Loading branch information
1 parent
01262dd
commit c5fe5e8
Showing
24 changed files
with
612 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
140.82.121.4 github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
root:x:0:0::/:none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
// https://chromium.googlesource.com/chromiumos/docs/+/HEAD/constants/syscalls.md | ||
#ifndef SYS_LINUX_COMPAT_H | ||
#define SYS_LINUX_COMPAT_H | ||
|
||
#ifdef __x86_64__ | ||
|
||
#define SYSCALL_READ 0 | ||
#define SYSCALL_WRITE 1 | ||
#define SYSCALL_OPEN 2 | ||
#define SYSCALL_CLOSE 3 | ||
#define SYSCALL_FSTAT 5 | ||
#define SYSCALL_LSEEK 8 | ||
#define SYSCALL_BRK 12 | ||
#define SYSCALL_IOCTL 16 | ||
#define SYSCALL_WRITEV 20 | ||
#define SYSCALL_DUP2 33 | ||
#define SYSCALL_GETPID 39 | ||
#define SYSCALL_SOCKET 41 | ||
#define SYSCALL_SENDTO 44 | ||
#define SYSCALL_RECVFROM 45 | ||
#define SYSCALL_EXECV 49 | ||
#define SYSCALL_EXIT 60 | ||
#define SYSCALL_GETTIMEOFDAY 96 | ||
#define SYSCALL_GETEUID 107 | ||
#define SYSCALL_ARCH_PRCTL 158 | ||
#define SYSCALL_REBOOT 169 | ||
#define SYSCALL_SET_TID_ADDR 218 | ||
#define SYSCALL_EXIT_GROUP 231 | ||
#define SYSCALL_OPENAT 257 | ||
|
||
#elif __arm__ | ||
|
||
#define SYSCALL_EXIT 1 | ||
#define SYSCALL_READ 3 | ||
#define SYSCALL_WRITE 4 | ||
#define SYSCALL_OPEN 5 | ||
#define SYSCALL_CLOSE 6 | ||
#define SYSCALL_EXECV 11 | ||
#define SYSCALL_LSEEK 19 | ||
#define SYSCALL_GETPID 20 | ||
#define SYSCALL_BRK 45 | ||
#define SYSCALL_GETEUID 49 | ||
#define SYSCALL_IOCTL 54 | ||
#define SYSCALL_DUP2 63 | ||
#define SYSCALL_GETTIMEOFDAY 78 | ||
#define SYSCALL_REBOOT 88 | ||
#define SYSCALL_FSTAT 108 | ||
#define SYSCALL_WRITEV 146 | ||
#define SYSCALL_EXIT_GROUP 248 | ||
#define SYSCALL_SET_TID_ADDR 256 | ||
#define SYSCALL_SOCKET 281 | ||
#define SYSCALL_SENDTO 290 | ||
#define SYSCALL_RECVFROM 292 | ||
#define SYSCALL_OPENAT 322 | ||
|
||
// Not available on AArch32: | ||
// | ||
// - SYSCALL_ARCH_PRCTL | ||
|
||
#elif __aarch64__ | ||
|
||
#define SYSCALL_IOCTL 29 | ||
#define SYSCALL_OPENAT 56 | ||
#define SYSCALL_CLOSE 57 | ||
#define SYSCALL_LSEEK 62 | ||
#define SYSCALL_READ 63 | ||
#define SYSCALL_WRITE 64 | ||
#define SYSCALL_WRITEV 66 | ||
#define SYSCALL_FSTAT 80 | ||
#define SYSCALL_EXIT 93 | ||
#define SYSCALL_EXIT_GROUP 94 | ||
#define SYSCALL_SET_TID_ADDR 96 | ||
#define SYSCALL_REBOOT 142 | ||
#define SYSCALL_GETTIMEOFDAY 169 | ||
#define SYSCALL_GETPID 172 | ||
#define SYSCALL_GETEUID 175 | ||
#define SYSCALL_SOCKET 198 | ||
#define SYSCALL_SENDTO 206 | ||
#define SYSCALL_RECVFROM 207 | ||
#define SYSCALL_BRK 214 | ||
#define SYSCALL_EXECV 221 | ||
|
||
// Not available on AArch64: | ||
// | ||
// - SYSCALL_OPEN | ||
// - SYSCALL_DUP2 | ||
// - SYSCALL_ARCH_PRCTL | ||
|
||
#endif | ||
|
||
// Not available outside ArvernOS: | ||
#define SYSCALL_TEST 348 | ||
#define SYSCALL_GETHOSTBYNAME2 349 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.