Skip to content
Commit 544fa1a2 authored by Ammar Faizi's avatar Ammar Faizi Committed by Paul E. McKenney
Browse files

tools/nolibc/sys: Implement `mmap()` and `munmap()`



Implement mmap() and munmap(). Currently, they are only available for
architecures that have my_syscall6 macro. For architectures that don't
have, this function will return -1 with errno set to ENOSYS (Function
not implemented).

This has been tested on x86 and i386.

Notes for i386:
 1) The common mmap() syscall implementation uses __NR_mmap2 instead
    of __NR_mmap.

 2) The offset must be shifted-right by 12-bit.

Acked-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarAmmar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent f4738ff7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment