mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
Start working on memory-mapped files.
First of all, change sys$mmap to take a struct SC_mmap_params since our sycsall calling convention can't handle more than 3 arguments. This exposed a bug in Syscall::invoke() needing to use clobber lists. It was a bit confusing to debug. :^)
This commit is contained in:
parent
41a751c90c
commit
fdbd9f1e27
14 changed files with 82 additions and 26 deletions
13
LibC/mman.h
13
LibC/mman.h
|
@ -3,9 +3,20 @@
|
|||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define MAP_SHARED 0x01
|
||||
#define MAP_PRIVATE 0x02
|
||||
#define MAP_FIXED 0x10
|
||||
#define MAP_ANONYMOUS 0x20
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
|
||||
#define PROT_READ 0x1
|
||||
#define PROT_WRITE 0x2
|
||||
#define PROT_EXEC 0x4
|
||||
#define PROT_NONE 0x0
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
void* mmap(void*, size_t);
|
||||
void* mmap(void* addr, size_t, int prot, int flags, int fd, off_t);
|
||||
int munmap(void*, size_t);
|
||||
int set_mmap_name(void*, size_t, const char*);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue