2 * David Leonard <d@openbsd.org>, 1999. Public Domain.
4 * $OpenBSD: uthread_msync.c,v 1.2 1999/06/09 07:16:17 d Exp $
10 #include <sys/types.h>
13 #include "un-namespace.h"
14 #include "thr_private.h"
16 int __msync(void *addr, size_t len, int flags);
18 __weak_reference(__msync, msync);
21 __msync(void *addr, size_t len, int flags)
23 struct pthread *curthread = _get_curthread();
27 * XXX This is quite pointless unless we know how to get the
28 * file descriptor associated with the memory, and lock it for
29 * write. The only real use of this wrapper is to guarantee
30 * a cancellation point, as per the standard. sigh.
32 _thr_cancel_enter(curthread);
33 ret = __sys_msync(addr, len, flags);
34 _thr_cancel_leave(curthread, 1);