projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
use rt_sigprocmask, not legacy sigprocmask, syscall in pthread exit code
[oweals/musl.git]
/
src
/
mman
/
mremap.c
1
#include <unistd.h>
2
#include <sys/mman.h>
3
#include <stdarg.h>
4
#include "syscall.h"
5
#include "libc.h"
6
7
void *__mremap(void *old_addr, size_t old_len, size_t new_len, int flags, ...)
8
{
9
va_list ap;
10
void *new_addr;
11
12
va_start(ap, flags);
13
new_addr = va_arg(ap, void *);
14
va_end(ap);
15
16
return (void *)syscall5(__NR_mremap, (long)old_addr, old_len, new_len, flags, (long)new_addr);
17
}
18
19
weak_alias(__mremap, mremap);