diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-09-01 08:43:17 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-09-01 08:43:17 +0000 |
commit | 6f7fa17e402e8cc267651b67669f04f70bc80527 (patch) | |
tree | 33c355f07dd56fc0df5441aea8278c44e88a7b6a /linuxthreads | |
parent | 1341abeec57403a7218c501632c452d72f8a3648 (diff) | |
download | glibc-6f7fa17e402e8cc267651b67669f04f70bc80527.tar glibc-6f7fa17e402e8cc267651b67669f04f70bc80527.tar.gz glibc-6f7fa17e402e8cc267651b67669f04f70bc80527.tar.bz2 glibc-6f7fa17e402e8cc267651b67669f04f70bc80527.zip |
Update.
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.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 7 | ||||
-rw-r--r-- | linuxthreads/lockfile.c | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index e55344bb4c..57bb848ce5 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -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> * manager.c (pthread_allocate_stack): Clear descriptor only if not diff --git a/linuxthreads/lockfile.c b/linuxthreads/lockfile.c index 0ef02f8757..a7836b8168 100644 --- a/linuxthreads/lockfile.c +++ b/linuxthreads/lockfile.c @@ -29,7 +29,8 @@ void __flockfile (FILE *stream) { #ifdef USE_IN_LIBIO - __pthread_mutex_lock (stream->_lock); + if ((stream->_flags & _IO_USER_LOCK) == 0) + __pthread_mutex_lock (stream->_lock); #else #endif } @@ -44,7 +45,8 @@ void __funlockfile (FILE *stream) { #ifdef USE_IN_LIBIO - __pthread_mutex_unlock (stream->_lock); + if ((stream->_flags & _IO_USER_LOCK) == 0) + __pthread_mutex_unlock (stream->_lock); #else #endif } @@ -59,7 +61,10 @@ int __ftrylockfile (FILE *stream) { #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 #endif } |