Пример #1
0
static void
fresetlockfiles (void)
{
  _IO_ITER i;

  for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
    _IO_lock_init (*((_IO_lock_t *) _IO_iter_file(i)->_lock));
}
Пример #2
0
static void
fresetlockfiles (void)
{
    _IO_ITER i;

    for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
        if ((_IO_iter_file (i)->_flags & _IO_USER_LOCK) == 0)
            _IO_lock_init (*((_IO_lock_t *) _IO_iter_file(i)->_lock));
}
Пример #3
0
void
__fresetlockfiles (void)
{
#ifdef USE_IN_LIBIO
  _IO_ITER i;

  pthread_mutexattr_t attr;

  __pthread_mutexattr_init (&attr);
  __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP);

  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
}