Reorganize the headers
authorcoderain <coderain@sdf.org>
Thu, 5 Oct 2017 02:47:38 +0000 (04:47 +0200)
committercoderain <coderain@sdf.org>
Thu, 5 Oct 2017 02:47:38 +0000 (04:47 +0200)
13 files changed:
.gitignore
kernel/Makefile
kernel/include/common.h
kernel/include/object.h
kernel/include/process.h
kernel/include/syscalls.h
kernel/src/syscalls.c
manager/Makefile
sdk/defs.h [new file with mode: 0644]
sdk/monolithium.h [new file with mode: 0644]
sdk/object.h [new file with mode: 0644]
sdk/process.h [new file with mode: 0644]
sdk/syscalls.h [new file with mode: 0644]

index b9c7b75777e692548dfd706a000495b71da6a079..d07151e0e9e4a1e92671bbefb274aab00a70aa42 100644 (file)
@@ -14,3 +14,5 @@
 !tests/*
 !manager
 !manager/*
+!sdk
+!sdk/*
index 004dffeb49f34943e6b4159ce52e0cbb7b6d225a..76932a0a71d74f988a7a920ddda4d9898fdee7bc 100644 (file)
@@ -34,7 +34,7 @@ DEPDIR = dep
 LIBGCC_DIR = $(shell $(CC) -print-file-name=)
 
 # Flags
-CFLAGS = -Wall -Werror -Wno-strict-aliasing -ffreestanding -nostdlib -I include
+CFLAGS = -Wall -Werror -Wno-strict-aliasing -ffreestanding -nostdlib -I include -I ..
 ASMFLAGS = -felf
 LDFLAGS = -T link.ld -L $(LIBGCC_DIR) -lgcc
 
index 9d261d043312318381e38ffef195c4a65246d773..b6f7681bead902cf73ca84f66a78705147cab9a8 100644 (file)
 #ifndef _COMMON_H_
 #define _COMMON_H_
 
-#include <limits.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#define FALSE 0
-#define TRUE (!FALSE)
-#define VARIABLE_SIZE 0
-
-/* Monolithium-specific Type Limits */
-#define BYTE_MIN  0
-#define BYTE_MAX  0xFF
-#define WORD_MIN  0
-#define WORD_MAX  0xFFFF
-#define DWORD_MIN 0
-#define DWORD_MAX 0xFFFFFFFF
-#define QWORD_MIN 0ULL
-#define QWORD_MAX 0xFFFFFFFFFFFFFFFFULL
-
-/* Monolithium Error Codes */
-#define ERR_SUCCESS   0x00000000
-#define ERR_NOTFOUND  0xE0000001
-#define ERR_FORBIDDEN 0xE0000002
-#define ERR_INVALID   0xE0000003
-#define ERR_EXISTS    0xE0000004
-#define ERR_NOMEMORY  0xE0000005
-#define ERR_HARDWARE  0xE0000006
-#define ERR_BUSY      0xE0000007
-#define ERR_NOMEDIA   0xE0000008
-#define ERR_NOTRESP   0xE0000009
-#define ERR_WRITEPROT 0xE000000A
-#define ERR_NOSYSCALL 0xE000000B
-#define ERR_TIMEOUT   0xE000000C
-#define ERR_BADPTR    0xE000000D
-#define ERR_CANCELED  0xE000000E
-#define ERR_ISDIR     0xE000000F
-#define ERR_ISNOTDIR  0xE0000010
-#define ERR_DISKFULL  0xE0000011
-#define ERR_MEDIACHG  0xE0000012
-#define ERR_BEYOND    0xE0000013
-#define ERR_SMALLBUF  0xE0000014
-#define ERR_NOMORE    0xE0000015
-#define MAX_ERR       0xE0000016
+#include <sdk/defs.h>
 
 /* Monolithium-specific Helper Macros */
 #define UNUSED_PARAMETER(x) (x)=(x)
@@ -72,8 +30,6 @@
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
 
-#define MAX_PATH 16384
-
 #define VIDEO_MEMORY 0xF0000000
 #define TEXT_VIDEO_MEMORY 0xB8000
 #define TEXT_COLOR_BLUE  0x01
 #define TEXT_COLOR_RED   0x04
 #define TEXT_COLOR_STRONG 0x08
 
-/* Monolithium-specific Types */
-typedef uint8_t bool_t;
-typedef uint8_t byte_t;
-typedef uint16_t word_t;
-typedef uint32_t dword_t;
-typedef uint64_t qword_t;
-typedef bool_t critical_t;
-
-static inline byte_t inportb(word_t port)
-{
-    byte_t byte;
-    asm volatile ("inb %1, %0" : "=a"(byte) : "Nd"(port));
-    return byte;
-}
-
-static inline void outportb(word_t port, byte_t byte)
-{
-    asm volatile ("outb %0, %1" :: "a"(byte), "Nd"(port));
-}
-
-static inline word_t inportw(unsigned short port)
-{
-    word_t word;
-    asm volatile ("inw %1, %0" : "=a"(word) : "Nd"(port));
-    return word;
-}
-
-static inline void outportw(word_t port, unsigned short word)
-{
-    asm volatile ("outw %0, %1" :: "a"(word), "Nd"(port));
-}
-
-static inline dword_t inportl(word_t port)
-{
-    dword_t dword;
-    asm volatile ("inl %1, %0" : "=a"(dword) : "Nd"(port));
-    return dword;
-}
+#define IO_PORT_FUNCTIONS(s, t) \
+    static inline t inport##s(word_t port) \
+    { \
+        t value; \
+        asm volatile ("in" #s " %1, %0\n" : "=a"(value) : "Nd"(port)); \
+        return value; \
+    } \
+    \
+    static inline void outport##s(word_t port, t value) \
+    { \
+        asm volatile ("out" #s " %0, %1\n" :: "a"(value), "Nd"(port)); \
+    } \
+    \
+    static inline void inportbuf##s(word_t port, t *buffer, size_t size) \
+    { \
+        asm volatile("cld\n" \
+                     "rep; ins" #s "\n" \
+                     :"+D"(buffer), "+c"(size) \
+                     : "d"(port) \
+                     : "cc"); \
+    } \
+    \
+    static inline void outportbuf##s(word_t port, const t *buffer, size_t size) \
+    { \
+        asm volatile("cld\n" \
+                     "rep; outs\n" \
+                     : "+S"(buffer), "+c"(size) \
+                     : "d"(port) \
+                     : "cc"); \
+    }
+
+IO_PORT_FUNCTIONS(b, byte_t)
+IO_PORT_FUNCTIONS(w, word_t)
+IO_PORT_FUNCTIONS(l, dword_t)
 
-static inline void outportl(word_t port, dword_t dword)
-{
-    asm volatile ("outl %0, %1" :: "a"(dword), "Nd"(port));
-}
+typedef bool_t critical_t;
 
 static inline void enable_ints()
 {
index fb2cf1128843869c5ba882676c0392682b5bab41..06bab1aa5bf151773f6134a7a046412237a1c5ff 100644 (file)
 #ifndef _OBJECT_H_
 #define _OBJECT_H_
 
-#include <common.h>
+#include <sdk/object.h>
 #include <list.h>
 
-#define INVALID_HANDLE (handle_t)-1
-
-typedef dword_t handle_t;
-typedef dword_t access_flags_t;
-
-typedef enum
-{
-    OBJECT_FILE,
-    OBJECT_FILE_INSTANCE,
-    OBJECT_PIPE,
-    OBJECT_PROCESS,
-    OBJECT_THREAD,
-    OBJECT_MEMORY,
-    OBJECT_SEMAPHORE,
-    OBJECT_USER,
-
-    OBJECT_TYPE_MAX
-} object_type_t;
-
-typedef enum
-{
-    HANDLE_INFO_NAME,
-    HANDLE_INFO_TYPE,
-} handle_info_type_t;
-
-typedef enum
-{
-    ACCESS_DEFAULT_ALLOW = 0,
-    ACCESS_DEFAULT_DENY,
-} access_control_policy_t;
-
 typedef struct
 {
     list_entry_t list;
index f2a42b79f0c1a22ae007f1ce23518227f1e37aea..d16287abd164f75e4dc1124b00c7486622f33780 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef _PROCESS_H_
 #define _PROCESS_H_
 
+#include <sdk/process.h>
 #include <common.h>
 #include <object.h>
 #include <memory.h>
 #define PROCESS_POOL_SIZE 524288
 #define STARTUP_HANDLE_TABLE_SIZE (256 * sizeof(handle_info_t))
 
-#define CLONE_MAGIC 0x79706F43
-
-#define PROCESS_CREATE_NO_INHERIT    (1 << 0)
-#define PROCESS_CREATE_NO_THREADS    (1 << 1)
-#define PROCESS_CREATE_FROZEN_THREAD (1 << 2)
-
-typedef enum
-{
-    PROCESS_PID_INFO,
-    PROCESS_NAME_INFO,
-    PROCESS_START_TIME_INFO,
-    PROCESS_MEMORY_INFO,
-    PROCESS_EXIT_CODE_INFO,
-    PROCESS_USER_INFO,
-    PROCESS_THREAD_INFO,
-    PROCESS_HANDLE_INFO,
-} process_info_t;
-
 #ifndef THREAD_TYPEDEF
 #define THREAD_TYPEDEF
 typedef struct thread thread_t;
@@ -88,14 +71,6 @@ struct process
 typedef struct process process_t;
 #endif
 
-typedef struct
-{
-    char *command_line;
-    handle_t standard_input;
-    handle_t standard_output;
-    handle_t standard_error;
-} process_params_t;
-
 extern process_t *kernel_process;
 
 process_t *get_current_process();
index c18a763f914914c1ace528fa0e2aad347564598b..07f6238180110bd380df74529ee9007fbd403344 100644 (file)
 #define _SYSCALLS_H_
 
 #include <common.h>
-
-#define MAX_PARAMETERS 16
-#define SYSCALL_INTERRUPT 0xE5
-
-typedef enum
-{
-    SYSCALL_ALLOC_MEMORY,
-    SYSCALL_CLOCK_GET_TIME,
-    SYSCALL_CLOCK_SET_TIME,
-    SYSCALL_CLOSE_OBJECT,
-    SYSCALL_COMMIT_MEMORY,
-    SYSCALL_CREATE_MEMORY_SECTION,
-    SYSCALL_CREATE_PROCESS,
-    SYSCALL_CREATE_SEMAPHORE,
-    SYSCALL_CREATE_THREAD,
-    SYSCALL_CREATE_USER,
-    SYSCALL_DELETE_FILE,
-    SYSCALL_DELETE_USER,
-    SYSCALL_DEVICE_IOCTL,
-    SYSCALL_DUPLICATE_HANDLE,
-    SYSCALL_ENUM_PROCESSES,
-    SYSCALL_FLUSH_MEMORY_SECTION,
-    SYSCALL_FREE_MEMORY,
-    SYSCALL_GET_EXCEPTION_INFO,
-    SYSCALL_GET_MILLISECONDS,
-    SYSCALL_GET_NANOSECONDS,
-    SYSCALL_GET_PROCESS_ID,
-    SYSCALL_GET_THREAD_ID,
-    SYSCALL_GET_USER_ID,
-    SYSCALL_LIST_DIRECTORY,
-    SYSCALL_LOGON_USER,
-    SYSCALL_MAP_MEMORY_SECTION,
-    SYSCALL_MOUNT,
-    SYSCALL_OPEN_FILE,
-    SYSCALL_OPEN_MEMORY_SECTION,
-    SYSCALL_OPEN_PIPE,
-    SYSCALL_OPEN_PROCESS,
-    SYSCALL_OPEN_THREAD,
-    SYSCALL_POWER_CONTROL,
-    SYSCALL_QUERY_FILE,
-    SYSCALL_QUERY_HANDLE,
-    SYSCALL_QUERY_PROCESS,
-    SYSCALL_QUERY_THREAD,
-    SYSCALL_QUERY_USER,
-    SYSCALL_RAISE_EXCEPTION,
-    SYSCALL_READ_FILE,
-    SYSCALL_READ_MEMORY,
-    SYSCALL_READ_PIPE,
-    SYSCALL_RELEASE_SEMAPHORE,
-    SYSCALL_RESTORE_EXCEPTION_HANDLER,
-    SYSCALL_REVERT_USER,
-    SYSCALL_SAVE_EXCEPTION_HANDLER,
-    SYSCALL_SET_MEMORY_FLAGS,
-    SYSCALL_SET_USER_ID,
-    SYSCALL_SLEEP,
-    SYSCALL_TERMINATE,
-    SYSCALL_TERMINATE_THREAD,
-    SYSCALL_UNCOMMIT_MEMORY,
-    SYSCALL_UNMOUNT,
-    SYSCALL_WAIT_DIRECTORY_EVENT,
-    SYSCALL_WAIT_PROCESS,
-    SYSCALL_WAIT_SEMAPHORE,
-    SYSCALL_WAIT_THREAD,
-    SYSCALL_WRITE_FILE,
-    SYSCALL_WRITE_MEMORY,
-    SYSCALL_WRITE_PIPE,
-    SYSCALL_YIELD_QUANTUM,
-
-    SERVICE_COUNT
-} syscall_number_t;
+#include <sdk/syscalls.h>
 
 typedef enum
 {
@@ -101,7 +32,6 @@ typedef enum
 char *copy_user_string(const char *string);
 processor_mode_t get_previous_mode();
 bool_t check_usermode(const void *pointer, dword_t size);
-qword_t syscall(dword_t num, ...);
 void syscalls_init();
 
 #endif
index 56e4e9377f293d40baa0c3684494cc8fb75b8d8d..2f83a42fd628377e6e324dc94827781166a3f778 100644 (file)
@@ -179,7 +179,7 @@ char *copy_user_string(const char *string)
     return result;
 }
 
-qword_t syscall(dword_t num, ...)
+qword_t syscall(syscall_number_t num, ...)
 {
     int i;
     qword_t ret = 0ULL;
index d1bf8431a64be6f64471f2b288a98268100036e6..d9bc8e2b6b958b63589b1dc548e470f2eb1da005 100644 (file)
@@ -33,7 +33,7 @@ DEPDIR = dep
 LIBGCC_DIR = $(shell $(CC) -print-file-name=)
 
 # Flags
-CFLAGS = -Wall -Werror -ffreestanding -nostdlib -I../kernel/include
+CFLAGS = -Wall -Werror -ffreestanding -nostdlib -I ../sdk
 ASMFLAGS = -felf
 LDFLAGS = -mi386aout -e process_startup -L $(LIBGCC_DIR) -lgcc -L ../library -lmlsys
 
diff --git a/sdk/defs.h b/sdk/defs.h
new file mode 100644 (file)
index 0000000..90d4242
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * defs.h
+ *
+ * Copyright (C) 2017 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MONOLITHIUM_DEFS_H__
+#define __MONOLITHIUM_DEFS_H__
+
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#define FALSE 0
+#define TRUE (!FALSE)
+#define VARIABLE_SIZE 0
+
+/* Monolithium-specific Type Limits */
+#define BYTE_MIN  0
+#define BYTE_MAX  0xFF
+#define WORD_MIN  0
+#define WORD_MAX  0xFFFF
+#define DWORD_MIN 0
+#define DWORD_MAX 0xFFFFFFFF
+#define QWORD_MIN 0ULL
+#define QWORD_MAX 0xFFFFFFFFFFFFFFFFULL
+
+/* Monolithium Error Codes */
+#define ERR_SUCCESS   0x00000000
+#define ERR_NOTFOUND  0xE0000001
+#define ERR_FORBIDDEN 0xE0000002
+#define ERR_INVALID   0xE0000003
+#define ERR_EXISTS    0xE0000004
+#define ERR_NOMEMORY  0xE0000005
+#define ERR_HARDWARE  0xE0000006
+#define ERR_BUSY      0xE0000007
+#define ERR_NOMEDIA   0xE0000008
+#define ERR_NOTRESP   0xE0000009
+#define ERR_WRITEPROT 0xE000000A
+#define ERR_NOSYSCALL 0xE000000B
+#define ERR_TIMEOUT   0xE000000C
+#define ERR_BADPTR    0xE000000D
+#define ERR_CANCELED  0xE000000E
+#define ERR_ISDIR     0xE000000F
+#define ERR_ISNOTDIR  0xE0000010
+#define ERR_DISKFULL  0xE0000011
+#define ERR_MEDIACHG  0xE0000012
+#define ERR_BEYOND    0xE0000013
+#define ERR_SMALLBUF  0xE0000014
+#define ERR_NOMORE    0xE0000015
+#define MAX_ERR       0xE0000016
+
+#define MAX_PATH 16384
+
+/* Monolithium-specific Types */
+typedef uint8_t bool_t;
+typedef uint8_t byte_t;
+typedef uint16_t word_t;
+typedef uint32_t dword_t;
+typedef uint64_t qword_t;
+
+#endif
diff --git a/sdk/monolithium.h b/sdk/monolithium.h
new file mode 100644 (file)
index 0000000..71c49e8
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * monolithium.h
+ *
+ * Copyright (C) 2017 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "defs.h"
+#include "process.h"
+#include "syscalls.h"
diff --git a/sdk/object.h b/sdk/object.h
new file mode 100644 (file)
index 0000000..ee2be63
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * object.h
+ *
+ * Copyright (C) 2013 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MONOLITHIUM_OBJECT_H__
+#define __MONOLITHIUM_OBJECT_H__
+
+#include "defs.h"
+
+#define INVALID_HANDLE (handle_t)-1
+
+typedef dword_t handle_t;
+typedef dword_t access_flags_t;
+
+typedef enum
+{
+    OBJECT_FILE,
+    OBJECT_FILE_INSTANCE,
+    OBJECT_PIPE,
+    OBJECT_PROCESS,
+    OBJECT_THREAD,
+    OBJECT_MEMORY,
+    OBJECT_SEMAPHORE,
+    OBJECT_USER,
+
+    OBJECT_TYPE_MAX
+} object_type_t;
+
+typedef enum
+{
+    HANDLE_INFO_NAME,
+    HANDLE_INFO_TYPE,
+} handle_info_type_t;
+
+typedef enum
+{
+    ACCESS_DEFAULT_ALLOW = 0,
+    ACCESS_DEFAULT_DENY,
+} access_control_policy_t;
+
+#endif
diff --git a/sdk/process.h b/sdk/process.h
new file mode 100644 (file)
index 0000000..b5fba55
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * process.h
+ *
+ * Copyright (C) 2016 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MONOLITHIUM_PROCESS_H__
+#define __MONOLITHIUM_PROCESS_H__
+
+#include "object.h"
+
+#define CLONE_MAGIC 0x79706F43
+
+#define PROCESS_CREATE_NO_INHERIT    (1 << 0)
+#define PROCESS_CREATE_NO_THREADS    (1 << 1)
+#define PROCESS_CREATE_FROZEN_THREAD (1 << 2)
+
+typedef enum
+{
+    PROCESS_PID_INFO,
+    PROCESS_NAME_INFO,
+    PROCESS_START_TIME_INFO,
+    PROCESS_MEMORY_INFO,
+    PROCESS_EXIT_CODE_INFO,
+    PROCESS_USER_INFO,
+    PROCESS_THREAD_INFO,
+    PROCESS_HANDLE_INFO,
+} process_info_t;
+
+typedef struct
+{
+    char *command_line;
+    handle_t standard_input;
+    handle_t standard_output;
+    handle_t standard_error;
+} process_params_t;
+
+#endif
diff --git a/sdk/syscalls.h b/sdk/syscalls.h
new file mode 100644 (file)
index 0000000..a7c54b7
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * syscalls.h
+ *
+ * Copyright (C) 2017 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MONOLITHIUM_SYSCALLS_H__
+#define __MONOLITHIUM_SYSCALLS_H__
+
+#include "defs.h"
+
+#define MAX_PARAMETERS 16
+#define SYSCALL_INTERRUPT 0xE5
+
+typedef enum
+{
+    SYSCALL_ALLOC_MEMORY,
+    SYSCALL_CLOCK_GET_TIME,
+    SYSCALL_CLOCK_SET_TIME,
+    SYSCALL_CLOSE_OBJECT,
+    SYSCALL_COMMIT_MEMORY,
+    SYSCALL_CREATE_MEMORY_SECTION,
+    SYSCALL_CREATE_PROCESS,
+    SYSCALL_CREATE_SEMAPHORE,
+    SYSCALL_CREATE_THREAD,
+    SYSCALL_CREATE_USER,
+    SYSCALL_DELETE_FILE,
+    SYSCALL_DELETE_USER,
+    SYSCALL_DEVICE_IOCTL,
+    SYSCALL_DUPLICATE_HANDLE,
+    SYSCALL_ENUM_PROCESSES,
+    SYSCALL_FLUSH_MEMORY_SECTION,
+    SYSCALL_FREE_MEMORY,
+    SYSCALL_GET_EXCEPTION_INFO,
+    SYSCALL_GET_MILLISECONDS,
+    SYSCALL_GET_NANOSECONDS,
+    SYSCALL_GET_PROCESS_ID,
+    SYSCALL_GET_THREAD_ID,
+    SYSCALL_GET_USER_ID,
+    SYSCALL_LIST_DIRECTORY,
+    SYSCALL_LOGON_USER,
+    SYSCALL_MAP_MEMORY_SECTION,
+    SYSCALL_MOUNT,
+    SYSCALL_OPEN_FILE,
+    SYSCALL_OPEN_MEMORY_SECTION,
+    SYSCALL_OPEN_PIPE,
+    SYSCALL_OPEN_PROCESS,
+    SYSCALL_OPEN_THREAD,
+    SYSCALL_POWER_CONTROL,
+    SYSCALL_QUERY_FILE,
+    SYSCALL_QUERY_HANDLE,
+    SYSCALL_QUERY_PROCESS,
+    SYSCALL_QUERY_THREAD,
+    SYSCALL_QUERY_USER,
+    SYSCALL_RAISE_EXCEPTION,
+    SYSCALL_READ_FILE,
+    SYSCALL_READ_MEMORY,
+    SYSCALL_READ_PIPE,
+    SYSCALL_RELEASE_SEMAPHORE,
+    SYSCALL_RESTORE_EXCEPTION_HANDLER,
+    SYSCALL_REVERT_USER,
+    SYSCALL_SAVE_EXCEPTION_HANDLER,
+    SYSCALL_SET_MEMORY_FLAGS,
+    SYSCALL_SET_USER_ID,
+    SYSCALL_SLEEP,
+    SYSCALL_TERMINATE,
+    SYSCALL_TERMINATE_THREAD,
+    SYSCALL_UNCOMMIT_MEMORY,
+    SYSCALL_UNMOUNT,
+    SYSCALL_WAIT_DIRECTORY_EVENT,
+    SYSCALL_WAIT_PROCESS,
+    SYSCALL_WAIT_SEMAPHORE,
+    SYSCALL_WAIT_THREAD,
+    SYSCALL_WRITE_FILE,
+    SYSCALL_WRITE_MEMORY,
+    SYSCALL_WRITE_PIPE,
+    SYSCALL_YIELD_QUANTUM,
+
+    SERVICE_COUNT
+} syscall_number_t;
+
+qword_t syscall(syscall_number_t num, ...);
+
+#endif