mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
Add x32 pthread types
This commit is contained in:
parent
7ac772940e
commit
b8caea2cb9
@ -1,3 +1,13 @@
|
|||||||
|
2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
|
||||||
|
__SIZEOF_PTHREAD_XXX_T.
|
||||||
|
(__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
|
||||||
|
(pthread_mutex_t): Likewise.
|
||||||
|
(pthread_rwlock_t): Likewise.
|
||||||
|
(__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
|
||||||
|
is defined.
|
||||||
|
|
||||||
2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
|
2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* sysdeps/x86_64/x32/tls.h: New file.
|
* sysdeps/x86_64/x32/tls.h: New file.
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <bits/wordsize.h>
|
#include <bits/wordsize.h>
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
# if __WORDSIZE == 64
|
# if __WORDSIZE == 64
|
||||||
# define __SIZEOF_PTHREAD_ATTR_T 56
|
# define __SIZEOF_PTHREAD_ATTR_T 56
|
||||||
# define __SIZEOF_PTHREAD_MUTEX_T 40
|
# define __SIZEOF_PTHREAD_MUTEX_T 40
|
||||||
@ -31,6 +32,17 @@
|
|||||||
# define __SIZEOF_PTHREAD_BARRIER_T 32
|
# define __SIZEOF_PTHREAD_BARRIER_T 32
|
||||||
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
|
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
|
||||||
# else
|
# else
|
||||||
|
# define __SIZEOF_PTHREAD_ATTR_T 32
|
||||||
|
# define __SIZEOF_PTHREAD_MUTEX_T 32
|
||||||
|
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
|
||||||
|
# define __SIZEOF_PTHREAD_COND_T 48
|
||||||
|
# define __SIZEOF_PTHREAD_CONDATTR_T 4
|
||||||
|
# define __SIZEOF_PTHREAD_RWLOCK_T 44
|
||||||
|
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
|
||||||
|
# define __SIZEOF_PTHREAD_BARRIER_T 20
|
||||||
|
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
# define __SIZEOF_PTHREAD_ATTR_T 36
|
# define __SIZEOF_PTHREAD_ATTR_T 36
|
||||||
# define __SIZEOF_PTHREAD_MUTEX_T 24
|
# define __SIZEOF_PTHREAD_MUTEX_T 24
|
||||||
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
|
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
|
||||||
@ -59,7 +71,7 @@ typedef union pthread_attr_t pthread_attr_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if __WORDSIZE == 64
|
#ifdef __x86_64__
|
||||||
typedef struct __pthread_internal_list
|
typedef struct __pthread_internal_list
|
||||||
{
|
{
|
||||||
struct __pthread_internal_list *__prev;
|
struct __pthread_internal_list *__prev;
|
||||||
@ -82,13 +94,13 @@ typedef union
|
|||||||
int __lock;
|
int __lock;
|
||||||
unsigned int __count;
|
unsigned int __count;
|
||||||
int __owner;
|
int __owner;
|
||||||
#if __WORDSIZE == 64
|
#ifdef __x86_64__
|
||||||
unsigned int __nusers;
|
unsigned int __nusers;
|
||||||
#endif
|
#endif
|
||||||
/* KIND must stay at this position in the structure to maintain
|
/* KIND must stay at this position in the structure to maintain
|
||||||
binary compatibility. */
|
binary compatibility. */
|
||||||
int __kind;
|
int __kind;
|
||||||
#if __WORDSIZE == 64
|
#ifdef __x86_64__
|
||||||
int __spins;
|
int __spins;
|
||||||
__pthread_list_t __list;
|
__pthread_list_t __list;
|
||||||
# define __PTHREAD_MUTEX_HAVE_PREV 1
|
# define __PTHREAD_MUTEX_HAVE_PREV 1
|
||||||
@ -151,7 +163,7 @@ typedef int pthread_once_t;
|
|||||||
structure of the attribute type is not exposed on purpose. */
|
structure of the attribute type is not exposed on purpose. */
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
# if __WORDSIZE == 64
|
# ifdef __x86_64__
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int __lock;
|
int __lock;
|
||||||
@ -167,6 +179,7 @@ typedef union
|
|||||||
/* FLAGS must stay at this position in the structure to maintain
|
/* FLAGS must stay at this position in the structure to maintain
|
||||||
binary compatibility. */
|
binary compatibility. */
|
||||||
unsigned int __flags;
|
unsigned int __flags;
|
||||||
|
# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
|
||||||
} __data;
|
} __data;
|
||||||
# else
|
# else
|
||||||
struct
|
struct
|
||||||
|
Loading…
Reference in New Issue
Block a user