]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libc_r/uthread/uthread_fchflags.c
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libc_r / uthread / uthread_fchflags.c
1 /*
2  * David Leonard <d@openbsd.org>, 1999. Public Domain.
3  *
4  * $OpenBSD: uthread_fchflags.c,v 1.1 1999/01/08 05:42:18 d Exp $
5  * $FreeBSD$
6  */
7
8 #include <sys/stat.h>
9 #include <unistd.h>
10 #include <pthread.h>
11 #include "pthread_private.h"
12
13 __weak_reference(_fchflags, fchflags);
14 int
15 _fchflags(int fd, u_long flags)
16 {
17         int             ret;
18
19         if ((ret = _FD_LOCK(fd, FD_WRITE, NULL)) == 0) {
20                 ret = __sys_fchflags(fd, flags);
21                 _FD_UNLOCK(fd, FD_WRITE);
22         }
23         return (ret);
24 }