From dc3b5786d2ec208fab58a0297226fce064ceda28 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 Jun 2000 23:43:59 +0000 Subject: Update. 2000-06-07 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (x86_cap_flags): Update. --- linuxthreads/lockfile.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'linuxthreads/lockfile.c') 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 } -- cgit v1.1