libc: Document functions in sys/mman.h
This commit is contained in:
parent
a3362429d3
commit
1e16a78106
@ -7,6 +7,8 @@
|
||||
#include "memory/VMM.h"
|
||||
#include <stddef.h>
|
||||
|
||||
// FIXME: Round size up instead of down. (use get_blocks_from_size)
|
||||
|
||||
#define MAP_FAIL(errno) 0xffffffffffffff00 | (unsigned char)(errno)
|
||||
|
||||
void sys_mmap(Context* context, void* address, size_t size, int flags)
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
typedef unsigned long off_t;
|
||||
|
||||
/* Address returned by mmap when it fails. */
|
||||
#define MAP_FAILED (void*)-1
|
||||
|
||||
#define PROT_READ_WRITE 1
|
||||
@ -16,8 +17,12 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void* mmap(void*, size_t, int, int, int, off_t);
|
||||
int munmap(void* addr, size_t len);
|
||||
/* Maps size bytes of memory (rounded down to the nearest page-aligned size) into the current process's address
|
||||
* space at addr. If addr is null, the kernel will choose an address. */
|
||||
void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset);
|
||||
/* Unmaps size bytes of memory (rounded down to the nearest page-aligned size) at addr from the current process's
|
||||
* address space. */
|
||||
int munmap(void* addr, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user