Start flushing out the IPI routines and do some clean-up.
[dragonfly/vkernel-mp.git] / lib / libc_r / uthread / uthread_fchflags.c
blobb1f37a03d726c020653a32bd8ac091e31b073247
1 /*
2 * David Leonard <d@openbsd.org>, 1999. Public Domain.
4 * $OpenBSD: uthread_fchflags.c,v 1.1 1999/01/08 05:42:18 d Exp $
5 * $FreeBSD: src/lib/libc_r/uthread/uthread_fchflags.c,v 1.4.2.2 2002/10/22 14:44:03 fjoe Exp $
6 * $DragonFly: src/lib/libc_r/uthread/uthread_fchflags.c,v 1.2 2003/06/17 06:26:48 dillon Exp $
7 */
9 #include <sys/stat.h>
10 #include <unistd.h>
11 #include <pthread.h>
12 #include "pthread_private.h"
14 int
15 _fchflags(int fd, u_long flags)
17 int ret;
19 if ((ret = _FD_LOCK(fd, FD_WRITE, NULL)) == 0) {
20 ret = __sys_fchflags(fd, flags);
21 _FD_UNLOCK(fd, FD_WRITE);
23 return (ret);
26 __strong_reference(_fchflags, fchflags);