freebsd-nq/lib/libc_r/uthread/uthread_fchflags.c
Jason Evans d77639f25f Use __strong_reference() instead of __weak_reference() to assure that the
weak symbols of the same name are not used.
2000-01-29 22:53:55 +00:00

28 lines
507 B
C

/*
* David Leonard <d@openbsd.org>, 1999. Public Domain.
*
* $OpenBSD: uthread_fchflags.c,v 1.1 1999/01/08 05:42:18 d Exp $
* $FreeBSD$
*/
#include <sys/stat.h>
#include <unistd.h>
#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
int
_fchflags(int fd, u_long flags)
{
int ret;
if ((ret = _FD_LOCK(fd, FD_WRITE, NULL)) == 0) {
ret = _thread_sys_fchflags(fd, flags);
_FD_UNLOCK(fd, FD_WRITE);
}
return (ret);
}
__strong_reference(_fchflags, fchflags);
#endif