aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-02-13 01:27:41 +0000
committerUlrich Drepper <drepper@redhat.com>2006-02-13 01:27:41 +0000
commitb007ce7cc6971e4bd4cd91c558efd3d4603d941d (patch)
treeb8c327bb42fea490cfa5ea910fbab4ca73a404aa /nptl/sysdeps/unix/sysv
parentbbf209a4272252276215e2606746eb2d3c7a326e (diff)
downloadglibc-b007ce7cc6971e4bd4cd91c558efd3d4603d941d.tar
glibc-b007ce7cc6971e4bd4cd91c558efd3d4603d941d.tar.gz
glibc-b007ce7cc6971e4bd4cd91c558efd3d4603d941d.tar.bz2
glibc-b007ce7cc6971e4bd4cd91c558efd3d4603d941d.zip
* allocatestack.c (allocate_stack): Initialize robust_list.cvs/fedora-glibc-20060213T0650
* init.c (__pthread_initialize_minimal_internal): Likewise. * descr.h (struct xid_command): Pretty printing. (struct pthread): Use __pthread_list_t or __pthread_slist_t for robust_list. Adjust macros. * pthread_create.c (start_thread): Adjust robust_list handling. * phtread_mutex_unlock.c: Don't allow unlocking from any thread but the owner for all robust mutex types. * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t. * sysdeps/pthread/pthread.h: Adjust mutex initializers.
Diffstat (limited to 'nptl/sysdeps/unix/sysv')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h19
2 files changed, 23 insertions, 4 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
index 662f3e54a8..f53d0e5a72 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
@@ -43,6 +43,12 @@ typedef union
} pthread_attr_t;
+typedef struct __pthread_internal_slist
+{
+ struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+
+
/* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */
typedef union
@@ -59,7 +65,7 @@ typedef union
__extension__ union
{
int __spins;
- struct __pthread_mutex_s *__next;
+ __pthread_slist_t __list;
};
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
index 81942bc86c..693387a266 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
@@ -57,6 +57,20 @@ typedef union
} pthread_attr_t;
+#if __WORDSIZE == 64
+typedef struct __pthread_internal_list
+{
+ struct __pthread_internal_list *__prev;
+ struct __pthread_internal_list *__next;
+} __pthread_list_t;
+#else
+typedef struct __pthread_internal_slist
+{
+ struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+#endif
+
+
/* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */
typedef union
@@ -74,15 +88,14 @@ typedef union
int __kind;
#if __WORDSIZE == 64
int __spins;
- struct __pthread_mutex_s *__next;
- struct __pthread_mutex_s *__prev;
+ __pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
#else
unsigned int __nusers;
__extension__ union
{
int __spins;
- struct __pthread_mutex_s *__next;
+ __pthread_slist_t __list;
};
#endif
} __data;