aboutsummaryrefslogtreecommitdiff
path: root/nptl/descr.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-30 19:45:57 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-30 19:45:57 +0000
commit5869d4ecdf225bf4be3ee8aa923cdd93230f3466 (patch)
tree916728c41bfc3c3463c62952cb409dc21f46c2a6 /nptl/descr.h
parentf8278d5d097d1e3c65dc815ad734f8f75ba12fa3 (diff)
downloadglibc-5869d4ecdf225bf4be3ee8aa923cdd93230f3466.zip
glibc-5869d4ecdf225bf4be3ee8aa923cdd93230f3466.tar.gz
glibc-5869d4ecdf225bf4be3ee8aa923cdd93230f3466.tar.bz2
(struct pthread): Move most often used elements to the front.
Diffstat (limited to 'nptl/descr.h')
-rw-r--r--nptl/descr.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/nptl/descr.h b/nptl/descr.h
index 5a4c99c..20e44af 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -86,7 +86,11 @@ struct pthread
/* List of cleanup buffers. */
struct _pthread_cleanup_buffer *cleanup;
- /* Two-level array for the thread-specific data. */
+ /* True if events must be reported. */
+ bool report_events;
+
+ /* We allocate one block of references here. This should be enough
+ to avoid allocating any memory dynamically for most applications. */
struct pthread_key_data
{
/* Sequence number. We use uintptr_t to not require padding on
@@ -96,20 +100,18 @@ struct pthread
/* Data pointer. */
void *data;
- } *specific[PTHREAD_KEY_1STLEVEL_SIZE];
- /* We allocate one block of references here. This should be enough
- to avoid allocating any memory dynamically for most applications. */
- struct pthread_key_data specific_1stblock[PTHREAD_KEY_2NDLEVEL_SIZE];
+ } specific_1stblock[PTHREAD_KEY_2NDLEVEL_SIZE];
+
/* Flag which is set when specific data is set. */
bool specific_used;
+ /* Two-level array for the thread-specific data. */
+ struct pthread_key_data *specific[PTHREAD_KEY_1STLEVEL_SIZE];
+
/* True if the user provided the stack. */
bool user_stack;
- /* True if events must be reported. */
- bool report_events;
-
- /* Lock to syncronize access to the descriptor. */
+ /* Lock to synchronize access to the descriptor. */
lll_lock_t lock;
#if HP_TIMING_AVAIL