summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/sparc
diff options
context:
space:
mode:
authorKhem Raj <kraj@mvista.com>2008-12-10 04:39:44 +0000
committerKhem Raj <kraj@mvista.com>2008-12-10 04:39:44 +0000
commita29f11cc811aecaa2474af413064afca961b081e (patch)
tree6862614ba98532a1a94c167920df67ce8afa1d08 /libpthread/nptl/sysdeps/unix/sysv/linux/sparc
parent4832b60988d116c0d59d46b63439da59058f2a98 (diff)
downloaduClibc-alpine-a29f11cc811aecaa2474af413064afca961b081e.tar.bz2
uClibc-alpine-a29f11cc811aecaa2474af413064afca961b081e.tar.xz
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Update pthread_mutex_t definition and initializations.
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/sparc')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
index 3c5a28944..459d1ca79 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
@@ -58,11 +58,25 @@ 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 deliberately not exposed. */
typedef union
{
- struct
+ struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
@@ -73,10 +87,18 @@ typedef union
/* KIND must stay at this position in the structure to maintain
binary compatibility. */
int __kind;
-#if __WORDSIZE != 64
+#if __WORDSIZE == 64
+ int __spins;
+ __pthread_list_t __list;
+# define __PTHREAD_MUTEX_HAVE_PREV 1
+#else
unsigned int __nusers;
+ __extension__ union
+ {
+ int __spins;
+ __pthread_slist_t __list;
+ };
#endif
- int __spins;
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;