Moved syscall IDs to separate header

This commit is contained in:
2022-08-19 06:06:48 -05:00
parent 164fb9fcae
commit 0337fca749
4 changed files with 19 additions and 13 deletions

View File

@@ -6,6 +6,7 @@
#include "queue.h"
#include "mmgr.h"
#include "syscalls.h"
#include "types/syscallid.h"
#include <stddef.h>
#define MAX_SYSCALL_ID 256

View File

@@ -3,19 +3,6 @@
#include <stdbool.h>
#include <stddef.h>
enum syscall_id_t
{
SYSCALL_TEST = 1,
SYSCALL_YIELD,
SYSCALL_MMAP,
SYSCALL_MUNMAP,
SYSCALL_TERMINATE_SELF,
SYSCALL_SEND,
SYSCALL_RECEIVE,
SYSCALL_OPEN_PORT,
SYSCALL_CLOSE_PORT
};
typedef union
{
long signed_int;

17
include/types/syscallid.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef QUARK_SYSCALLID_H
#define QUARK_SYSCALLID_H
enum syscall_id_t
{
SYSCALL_TEST = 1,
SYSCALL_MMAP,
SYSCALL_MUNMAP,
SYSCALL_YIELD,
SYSCALL_EXIT,
SYSCALL_SEND,
SYSCALL_RECEIVE,
SYSCALL_OPEN_PORT,
SYSCALL_CLOSE_PORT
};
#endif

View File

@@ -11,6 +11,7 @@
#include "platform/context.h"
#include "platform/putc.h"
#include "types/status.h"
#include "types/syscallid.h"
struct kernel_t kernel;