xref: /openbsd/lib/libc/sys/posix_madvise.c (revision a6445c1d)
1 /*	$OpenBSD: posix_madvise.c,v 1.3 2014/07/10 13:42:53 guenther Exp $ */
2 /*
3  * Ted Unangst wrote this file and placed it into the public domain.
4  */
5 #include <sys/mman.h>
6 #include <errno.h>
7 
8 int _thread_sys_madvise(void *addr, size_t len, int behav);
9 
10 int
11 posix_madvise(void *addr, size_t len, int behav)
12 {
13 	return (_thread_sys_madvise(addr, len, behav) ? errno : 0);
14 }
15