Redesign syscalls
All checks were successful
Build documentation / build-and-deploy (push) Successful in 40s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 40s
This commit is contained in:
28
libmsl/m/system.h
Normal file
28
libmsl/m/system.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef _LIBMSL_M_SYSTEM_H
|
||||
#define _LIBMSL_M_SYSTEM_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#define PROC_MAP_BASE 0x0000700000000000
|
||||
#define PAGE_SIZE 4096
|
||||
#endif
|
||||
|
||||
#define MAP_PRESENT (1 << 0)
|
||||
#define MAP_RW (1 << 1)
|
||||
#define MAP_USER (1 << 2)
|
||||
#define MAP_FLAGS (MAP_PRESENT | MAP_USER)
|
||||
|
||||
#define RV_PRIVATE 0
|
||||
#define RV_PUBLIC 1
|
||||
|
||||
int quit (void);
|
||||
int test (char c);
|
||||
int map (int mem_rid, int vis, uintptr_t vaddr, uint32_t flags);
|
||||
int unmap (uintptr_t vaddr, size_t pages);
|
||||
int create_mem (int mem_rid, int vis, size_t pages);
|
||||
int unlink_mem (int mem_rid, int vis, size_t pages);
|
||||
int clone (uintptr_t vstack_top, size_t stack_size, void (*entry) (void));
|
||||
|
||||
#endif // _LIBMSL_M_SYSTEM_H
|
||||
Reference in New Issue
Block a user