about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/pthread
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-15 01:23:02 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-15 01:23:02 +0000
commit574b892ef1054ea999a136b3cb2321a65e3f1a17 (patch)
tree4457b51f3d0318c24de35da02ce2d90ac818beb8 /linuxthreads/sysdeps/pthread
parent086311a933ff53f8c064d833e69fe228bc7e8886 (diff)
downloadglibc-574b892ef1054ea999a136b3cb2321a65e3f1a17.tar.gz
glibc-574b892ef1054ea999a136b3cb2321a65e3f1a17.tar.xz
glibc-574b892ef1054ea999a136b3cb2321a65e3f1a17.zip
Update.
2003-01-14  Guido Guenther  <agx@sigxcpu.org>

	* 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  <sjmunroe@us.ibm.com>

	* 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 <zzz@cd-club.ru>.
	that %eax is modified.  Reported by Denis Zaitsev <zzz@cd-club.ru>.
Diffstat (limited to 'linuxthreads/sysdeps/pthread')
-rw-r--r--linuxthreads/sysdeps/pthread/bits/libc-lock.h22
1 files changed, 22 insertions, 0 deletions
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)