1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2000-09-01  Ulrich Drepper  <drepper@redhat.com>

	* lockfile.c (__flockfile): If _IO_USER_LOCK bit is set don't do
	anything.
	(__funlockfile): Likewise.
	(__ftrylockfile): If _IO_USER_LOCK bit is set return always 0.
This commit is contained in:
Ulrich Drepper
2000-09-01 08:43:17 +00:00
parent 1341abeec5
commit 6f7fa17e40
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2000-09-01 Ulrich Drepper <drepper@redhat.com>
* lockfile.c (__flockfile): If _IO_USER_LOCK bit is set don't do
anything.
(__funlockfile): Likewise.
(__ftrylockfile): If _IO_USER_LOCK bit is set return always 0.
2000-08-30 Ulrich Drepper <drepper@redhat.com> 2000-08-30 Ulrich Drepper <drepper@redhat.com>
* manager.c (pthread_allocate_stack): Clear descriptor only if not * manager.c (pthread_allocate_stack): Clear descriptor only if not

View File

@ -29,7 +29,8 @@ void
__flockfile (FILE *stream) __flockfile (FILE *stream)
{ {
#ifdef USE_IN_LIBIO #ifdef USE_IN_LIBIO
__pthread_mutex_lock (stream->_lock); if ((stream->_flags & _IO_USER_LOCK) == 0)
__pthread_mutex_lock (stream->_lock);
#else #else
#endif #endif
} }
@ -44,7 +45,8 @@ void
__funlockfile (FILE *stream) __funlockfile (FILE *stream)
{ {
#ifdef USE_IN_LIBIO #ifdef USE_IN_LIBIO
__pthread_mutex_unlock (stream->_lock); if ((stream->_flags & _IO_USER_LOCK) == 0)
__pthread_mutex_unlock (stream->_lock);
#else #else
#endif #endif
} }
@ -59,7 +61,10 @@ int
__ftrylockfile (FILE *stream) __ftrylockfile (FILE *stream)
{ {
#ifdef USE_IN_LIBIO #ifdef USE_IN_LIBIO
return __pthread_mutex_trylock (stream->_lock); if ((stream->_flags & _IO_USER_LOCK) == 0)
return __pthread_mutex_trylock (stream->_lock);
else
return 0;
#else #else
#endif #endif
} }