Files
mop3/libmsl/m/proc.h
2026-01-18 20:50:45 +01:00

35 lines
931 B
C

#ifndef _LIBMSL_M_PROC_H
#define _LIBMSL_M_PROC_H
#if defined(__x86_64__)
#define PROC_MAP_BASE 0x0000700000000000
#define PAGE_SIZE 4096
#endif
#define PM_PRESENT (1 << 0)
#define PM_RW (1 << 1)
#define PM_USER (1 << 2)
#define RV_PRIVATE 0
#define RV_PUBLIC 1
#define PR_MEM 0
#define PR_MUTEX 1
#include <stddef.h>
#include <stdint.h>
int proc_quit (void);
int proc_test (char c);
int proc_map (uintptr_t paddr, uintptr_t vaddr, size_t pages, uint32_t flags);
int proc_unmap (uintptr_t vaddr, size_t pages);
int proc_create_resource (int rid, int type, int vis, void* buffer);
int proc_drop_resource (int rid, int vis);
int proc_mutex_lock (int mutex_rid, int vis);
int proc_mutex_unlock (int mutex_rid, int vis);
int proc_spawn_thread (uintptr_t vstack_top, size_t stack_size, void* entry);
int proc_sched (void);
int proc_translate_v2p (uintptr_t vaddr, uintptr_t* out_paddr);
#endif // _LIBMSL_M_PROC_H