Files
mop3/libmsl/m/system.h
kamkow1 38e26a9c12
All checks were successful
Build documentation / build-and-deploy (push) Successful in 37s
Implement argument_ptr () syscall for handling process arguments
2026-01-30 14:05:47 +01:00

29 lines
707 B
C

#ifndef _LIBMSL_M_SYSTEM_H
#define _LIBMSL_M_SYSTEM_H
#include <stddef.h>
#include <stdint.h>
#if defined(__x86_64__)
#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)
int quit (void);
int test (char c);
int sched (void);
void* map (uintptr_t vaddr, size_t pages, uint32_t flags);
int unmap (uintptr_t vaddr, size_t pages);
int clone (uintptr_t vstack_top, void (*entry) (void), void* argument_ptr);
int mutex_create (int mutex_rid);
int mutex_delete (int mutex_rid);
int mutex_lock (int mutex_rid);
int mutex_unlock (int mutex_rid);
void* argument_ptr (void);
#endif // _LIBMSL_M_SYSTEM_H