diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-11-04 23:43:40 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-11-04 23:43:40 +0000 |
commit | c28422b575d8399fc3d5ce8e50cbde83c58b647c (patch) | |
tree | 4c6a40e643fb0b1efed9ece8dc153e771f0bc51f /nptl/sysdeps/pthread/bits/stdio-lock.h | |
parent | 9378784537d0a4cd4e630aa360d0ae838dfcf500 (diff) | |
download | glibc-c28422b575d8399fc3d5ce8e50cbde83c58b647c.tar.gz glibc-c28422b575d8399fc3d5ce8e50cbde83c58b647c.tar.xz glibc-c28422b575d8399fc3d5ce8e50cbde83c58b647c.zip |
Update.
2003-11-04 Ulrich Drepper <drepper@redhat.com> * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of lll_mutex_*lock macros to skip atomic operations on some archs.
Diffstat (limited to 'nptl/sysdeps/pthread/bits/stdio-lock.h')
-rw-r--r-- | nptl/sysdeps/pthread/bits/stdio-lock.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nptl/sysdeps/pthread/bits/stdio-lock.h b/nptl/sysdeps/pthread/bits/stdio-lock.h index b084e91e40..cd64bc37e2 100644 --- a/nptl/sysdeps/pthread/bits/stdio-lock.h +++ b/nptl/sysdeps/pthread/bits/stdio-lock.h @@ -29,7 +29,7 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; -#define _IO_lock_initializer { LLL_MUTEX_LOCK_INITIALIZER, 0, NULL } +#define _IO_lock_initializer { LLL_LOCK_INITIALIZER, 0, NULL } #define _IO_lock_init(_name) \ ((_name) = (_IO_lock_t) _IO_lock_initializer , 0) @@ -42,7 +42,7 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; void *__self = THREAD_SELF; \ if ((_name).owner != __self) \ { \ - lll_mutex_lock ((_name).lock); \ + lll_lock ((_name).lock); \ (_name).owner = __self; \ } \ ++(_name).cnt; \ @@ -54,7 +54,7 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; void *__self = THREAD_SELF; \ if ((_name).owner != __self) \ { \ - if (lll_mutex_trylock ((_name).lock) == 0) \ + if (lll_trylock ((_name).lock) == 0) \ { \ (_name).owner = __self; \ (_name).cnt = 1; \ @@ -72,7 +72,7 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; if (--(_name).cnt == 0) \ { \ (_name).owner = NULL; \ - lll_mutex_unlock ((_name).lock); \ + lll_unlock ((_name).lock); \ } \ } while (0) |