From 574b892ef1054ea999a136b3cb2321a65e3f1a17 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Jan 2003 01:23:02 +0000 Subject: Update. 2003-01-14 Guido Guenther * sysdeps/unix/sysv/linux/mips/sysdep.h (INTERNAL_SYSCALL, INTERNAL_SYSCALL_DECL, INTERNAL_SYSCALL_ERRNO, INTERNAL_SYSCALL_ERROR_P, INLINE_SYSCALL): Define. 2003-01-14 Steven Munroe * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (INTERNAL_SYSCALL): Make use of ERR parameter. (INTERNAL_SYSCALL_DECL, INTERNAL_SYSCALL_ERRNO, INTERNAL_SYSCALL_ERROR_P): Adjust accordingly. (INLINE_SYSCALL): Make use of INTERNAL_SYSCALL. * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file. Patch by Denis Zaitsev . that %eax is modified. Reported by Denis Zaitsev . --- linuxthreads/sysdeps/pthread/bits/libc-lock.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'linuxthreads/sysdeps/pthread/bits/libc-lock.h') diff --git a/linuxthreads/sysdeps/pthread/bits/libc-lock.h b/linuxthreads/sysdeps/pthread/bits/libc-lock.h index bb0472d453..136b1a8a64 100644 --- a/linuxthreads/sysdeps/pthread/bits/libc-lock.h +++ b/linuxthreads/sysdeps/pthread/bits/libc-lock.h @@ -116,12 +116,33 @@ typedef pthread_key_t __libc_key_t; /* Initialize the named lock variable, leaving it in a consistent, unlocked state. */ +#if defined _LIBC && !defined NOT_IN_libc && defined SHARED +#define __libc_lock_init(NAME) \ + ({ \ + (NAME).__m_count = 0; \ + (NAME).__m_owner = NULL; \ + (NAME).__m_kind = PTHREAD_MUTEX_TIMED_NP; \ + (NAME).__m_lock.__status = 0; \ + (NAME).__m_lock.__spinlock = __LT_SPINLOCK_INIT; \ + 0; }) +#else #define __libc_lock_init(NAME) \ (__libc_maybe_call2 (pthread_mutex_init, (&(NAME), NULL), 0)) +#endif #define __libc_rwlock_init(NAME) \ (__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0)); /* Same as last but this time we initialize a recursive mutex. */ +#if defined _LIBC && !defined NOT_IN_libc && defined SHARED +#define __libc_lock_init_recursive(NAME) \ + ({ \ + (NAME).mutex.__m_count = 0; \ + (NAME).mutex.__m_owner = NULL; \ + (NAME).mutex.__m_kind = PTHREAD_MUTEX_RECURSIVE_NP; \ + (NAME).mutex.__m_lock.__status = 0; \ + (NAME).mutex.__m_lock.__spinlock = __LT_SPINLOCK_INIT; \ + 0; }) +#else #define __libc_lock_init_recursive(NAME) \ do { \ if (__pthread_mutex_init != NULL) \ @@ -133,6 +154,7 @@ typedef pthread_key_t __libc_key_t; __pthread_mutexattr_destroy (&__attr); \ } \ } while (0); +#endif #define __rtld_lock_init_recursive(NAME) \ __libc_lock_init_recursive (NAME) -- cgit v1.2.3-70-g09d2