aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/lockfile.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-07 23:43:59 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-07 23:43:59 +0000
commitdc3b5786d2ec208fab58a0297226fce064ceda28 (patch)
treed1dba56ab45fb5ab7a2cd5a76b80dc85e5542c98 /linuxthreads/lockfile.c
parent3fc9ca4e389ff1606a4883d50401eaa1a777a07e (diff)
downloadglibc-dc3b5786d2ec208fab58a0297226fce064ceda28.zip
glibc-dc3b5786d2ec208fab58a0297226fce064ceda28.tar.gz
glibc-dc3b5786d2ec208fab58a0297226fce064ceda28.tar.bz2
Update.
2000-06-07 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (x86_cap_flags): Update.
Diffstat (limited to 'linuxthreads/lockfile.c')
-rw-r--r--linuxthreads/lockfile.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/linuxthreads/lockfile.c b/linuxthreads/lockfile.c
index 0c9cf27..b6f98a4 100644
--- a/linuxthreads/lockfile.c
+++ b/linuxthreads/lockfile.c
@@ -68,20 +68,39 @@ strong_alias (__ftrylockfile, _IO_ftrylockfile)
#endif
weak_alias (__ftrylockfile, ftrylockfile);
+void
+__flockfilelist(void)
+{
+#ifdef USE_IN_LIBIO
+ _IO_list_lock();
+#endif
+}
+
+void
+__funlockfilelist(void)
+{
+#ifdef USE_IN_LIBIO
+ _IO_list_unlock();
+#endif
+}
void
__fresetlockfiles (void)
{
#ifdef USE_IN_LIBIO
+ _IO_ITER i;
+
_IO_FILE *fp;
pthread_mutexattr_t attr;
__pthread_mutexattr_init (&attr);
__pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP);
- for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
- __pthread_mutex_init (fp->_lock, &attr);
+ for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
+ __pthread_mutex_init (_IO_iter_file(i)->_lock, &attr);
__pthread_mutexattr_destroy (&attr);
+
+ _IO_list_resetlock();
#endif
}