1 |
|
|
/* $OpenBSD: mquery.c,v 1.8 2015/09/11 13:26:20 guenther Exp $ */ |
2 |
|
|
/* |
3 |
|
|
* Written by Artur Grabowski <art@openbsd.org> Public Domain |
4 |
|
|
*/ |
5 |
|
|
|
6 |
|
|
#include <sys/types.h> |
7 |
|
|
#include <sys/mman.h> |
8 |
|
|
#include <sys/syscall.h> |
9 |
|
|
|
10 |
|
|
void *__syscall(quad_t, ...); |
11 |
|
|
PROTO_NORMAL(__syscall); |
12 |
|
|
|
13 |
|
|
DEF_SYS(mquery); |
14 |
|
|
|
15 |
|
|
/* |
16 |
|
|
* This function provides 64-bit offset padding. |
17 |
|
|
*/ |
18 |
|
|
void * |
19 |
|
|
mquery(void *addr, size_t len, int prot, int flags, int fd, off_t offset) |
20 |
|
|
{ |
21 |
|
6818 |
return (__syscall(SYS_mquery, addr, len, prot, flags, fd, 0, offset)); |
22 |
|
|
} |
23 |
|
|
DEF_WEAK(mquery); |