From: Ulrich Drepper Date: Wed, 12 Jan 2000 11:57:16 +0000 (+0000) Subject: (pthread_readlock_info): New structure. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cecbddd661f265c033061278abca7218c12ac585;p=thirdparty%2Fglibc.git (pthread_readlock_info): New structure. (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and p_untracked_readlock_count. --- diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index 671deee060b..63eac991616 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -102,6 +102,22 @@ struct pthread_atomic { int p_spinlock; }; +/* Context info for read write locks. The pthread_rwlock_info structure + is information about a lock that has been read-locked by the thread + in whose list this structure appears. The pthread_rwlock_context + is embedded in the thread context and contains a pointer to the + head of the list of lock info structures, as well as a count of + read locks that are untracked, because no info structure could be + allocated for them. */ + +struct _pthread_rwlock_t; + +typedef struct _pthread_rwlock_info { + struct _pthread_rwlock_info *pr_next; + struct _pthread_rwlock_t *pr_lock; + int pr_lock_count; +} pthread_readlock_info; + struct _pthread_descr_struct { pthread_descr p_nextlive, p_prevlive; /* Double chaining of active threads */ @@ -144,6 +160,9 @@ struct _pthread_descr_struct { called on thread */ char p_woken_by_cancel; /* cancellation performed wakeup */ pthread_extricate_if *p_extricate; /* See above */ + pthread_readlock_info *p_readlock_list; /* List of readlock info structs */ + pthread_readlock_info *p_readlock_free; /* Free list of structs */ + int p_untracked_readlock_count; /* Readlocks not tracked by list */ /* New elements must be added at the end. */ } __attribute__ ((aligned(32))); /* We need to align the structure so that doubles are aligned properly. This is 8