Revert "Reserve space in pthread structures for future extensibility."
This reverts commit cf83fd77caa3128ecb6ac935e342cb0ea258b9ee. Change-Id: I4f69e86ffe1c267a9018eb489d909237534c6cf9
This commit is contained in:
parent
cf83fd77ca
commit
6b64000ef0
@ -35,26 +35,17 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#ifdef __LP64__
|
|
||||||
#define __RESERVED_INITIALIZER , {0}
|
|
||||||
#else
|
|
||||||
#define __RESERVED_INITIALIZER
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int volatile value;
|
int volatile value;
|
||||||
#ifdef __LP64__
|
|
||||||
char __reserved[36];
|
|
||||||
#endif
|
|
||||||
} pthread_mutex_t;
|
} pthread_mutex_t;
|
||||||
|
|
||||||
#define __PTHREAD_MUTEX_INIT_VALUE 0
|
#define __PTHREAD_MUTEX_INIT_VALUE 0
|
||||||
#define __PTHREAD_RECURSIVE_MUTEX_INIT_VALUE 0x4000
|
#define __PTHREAD_RECURSIVE_MUTEX_INIT_VALUE 0x4000
|
||||||
#define __PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE 0x8000
|
#define __PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE 0x8000
|
||||||
|
|
||||||
#define PTHREAD_MUTEX_INITIALIZER {__PTHREAD_MUTEX_INIT_VALUE __RESERVED_INITIALIZER}
|
#define PTHREAD_MUTEX_INITIALIZER {__PTHREAD_MUTEX_INIT_VALUE}
|
||||||
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {__PTHREAD_RECURSIVE_MUTEX_INIT_VALUE __RESERVED_INITIALIZER}
|
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {__PTHREAD_RECURSIVE_MUTEX_INIT_VALUE}
|
||||||
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {__PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE __RESERVED_INITIALIZER}
|
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {__PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PTHREAD_MUTEX_NORMAL = 0,
|
PTHREAD_MUTEX_NORMAL = 0,
|
||||||
@ -69,12 +60,9 @@ enum {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int volatile value;
|
int volatile value;
|
||||||
#ifdef __LP64__
|
|
||||||
char __reserved[44];
|
|
||||||
#endif
|
|
||||||
} pthread_cond_t;
|
} pthread_cond_t;
|
||||||
|
|
||||||
#define PTHREAD_COND_INITIALIZER {0 __RESERVED_INITIALIZER}
|
#define PTHREAD_COND_INITIALIZER {0}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
@ -83,9 +71,6 @@ typedef struct {
|
|||||||
size_t guard_size;
|
size_t guard_size;
|
||||||
int32_t sched_policy;
|
int32_t sched_policy;
|
||||||
int32_t sched_priority;
|
int32_t sched_priority;
|
||||||
#ifdef __LP64__
|
|
||||||
char __reserved[16];
|
|
||||||
#endif
|
|
||||||
} pthread_attr_t;
|
} pthread_attr_t;
|
||||||
|
|
||||||
typedef long pthread_mutexattr_t;
|
typedef long pthread_mutexattr_t;
|
||||||
@ -100,7 +85,7 @@ typedef struct {
|
|||||||
int writerThreadId;
|
int writerThreadId;
|
||||||
int pendingReaders;
|
int pendingReaders;
|
||||||
int pendingWriters;
|
int pendingWriters;
|
||||||
void* __reserved[4];
|
void* reserved[4]; /* for future extensibility */
|
||||||
} pthread_rwlock_t;
|
} pthread_rwlock_t;
|
||||||
|
|
||||||
#define PTHREAD_RWLOCK_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0, 0, 0, { NULL, NULL, NULL, NULL } }
|
#define PTHREAD_RWLOCK_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0, 0, 0, { NULL, NULL, NULL, NULL } }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user