blob: 2cbbe9c6f47be6b5ff9e91b3a010cfec01d1df88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*
* David Leonard <d@openbsd.org>, 1999. Public Domain.
*
* $OpenBSD: uthread_msync.c,v 1.4 2004/04/10 06:48:03 brad Exp $
*/
#include <sys/types.h>
#include <sys/mman.h>
#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
int
msync(void *addr, size_t len, int flags)
{
int ret;
/* This is a cancellation point: */
_thread_enter_cancellation_point();
ret = _thread_sys_msync(addr, len, flags);
/* No longer in a cancellation point: */
_thread_leave_cancellation_point();
return (ret);
}
#endif
|