Files
nt-lite/code/kernel/syscall_nr.h
T

87 lines
3.5 KiB
C

#pragma once
// syscall_nr.h
// INT 0x40 calling convention, MS x64:
// RAX = syscall number
// RCX, RDX, R8, R9 = args 0-3
// R10, R11 = args 4-5 (loaded by SYSCALL_STUB6)
// RAX = return value
#define SYS_EXIT_PROCESS 0
#define SYS_EXIT_THREAD 1
#define SYS_CREATE_PROCESS 2
#define SYS_WAIT_FOR_PROCESS 3
#define SYS_GET_PROCESS_EXIT_CODE 4
#define SYS_KILL_PROCESS 5
#define SYS_GET_PROCESS_LIST 6
#define SYS_GET_PROCESS_PID 7
#define SYS_CREATE_THREAD 8
#define SYS_WAIT_THREAD 9
#define SYS_GET_CURRENT_TID 10
#define SYS_GET_CURRENT_PID 11
#define SYS_SET_THREAD_PRIORITY 12
#define SYS_YIELD 13
#define SYS_SLEEP 14
#define SYS_SET_USER_APC_DISPATCHER 15
#define SYS_APC_RETURN 16
#define SYS_ALLOC 17
#define SYS_FREE 18
#define SYS_REALLOC 19
#define SYS_CLOSE_HANDLE 20
#define SYS_MUTEX_CREATE 21
#define SYS_MUTEX_ACQUIRE 22
#define SYS_MUTEX_TRY_ACQUIRE 23
#define SYS_MUTEX_RELEASE 24
#define SYS_SEM_CREATE 25
#define SYS_SEM_WAIT 26
#define SYS_SEM_TRY_WAIT 27
#define SYS_SEM_SIGNAL 28
#define SYS_EVENT_CREATE 29
#define SYS_EVENT_SIGNAL 30
#define SYS_EVENT_CLEAR 31
#define SYS_EVENT_WAIT 32
#define SYS_QUEUE_CREATE 33
#define SYS_QUEUE_SEND 34
#define SYS_QUEUE_RECV 35
#define SYS_PUBLISH_QUEUE 36
#define SYS_OPEN_NAMED_QUEUE 37
#define SYS_QUEUE_DUPLICATE 38
#define SYS_NAMED_QUEUE_OWNER_PID 39
#define SYS_OPEN_FILE 40
#define SYS_CREATE_FILE 41
#define SYS_READ_FILE 42
#define SYS_WRITE_FILE 43
#define SYS_READ_FILE_ASYNC 44
#define SYS_WRITE_FILE_ASYNC 45
#define SYS_CANCEL_IO 46
#define SYS_SEEK_FILE 47
#define SYS_GET_FILE_POS 48
#define SYS_GET_FILE_SIZE 49
#define SYS_TRUNCATE_FILE 50
#define SYS_DELETE_FILE 51
#define SYS_RENAME_FILE 52
#define SYS_OPEN_DIR 53
#define SYS_READ_DIR 54
#define SYS_CREATE_DIR 55
#define SYS_REMOVE_DIR 56
#define SYS_SET_CWD 57
#define SYS_GET_CWD 58
#define SYS_WRITE_CONSOLE 59
#define SYS_SCREEN_BLIT 60
#define SYS_SCREEN_CLEAR 61
#define SYS_SCREEN_GET_SIZE 62
#define SYS_SCREEN_PUT_CHAR 63
#define SYS_KB_POLL 64
#define SYS_KB_IS_KEY_DOWN 65
#define SYS_KB_READ_CHAR 66
#define SYS_KB_READ_SCANCODE 67
#define SYS_KB_GET_MODIFIERS 68
#define SYS_MOUSE_POLL 69
#define SYS_MOUSE_READ 70
#define SYS_MOUSE_GET_POS 71
#define SYS_GET_TICK 72
#define SYS_DEBUG_PRINT 73
#define SYS_QUERY_TRAP_FRAME 74
#define SYS_CATCHALLDEBUGBUCKET 75
#define SYS_MAX 76