]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(pthread_readlock_info): New structure.
authorUlrich Drepper <drepper@redhat.com>
Wed, 12 Jan 2000 11:57:16 +0000 (11:57 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 12 Jan 2000 11:57:16 +0000 (11:57 +0000)
(_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
p_untracked_readlock_count.

linuxthreads/internals.h

index 671deee060bc87c55c0d8b14a83039d2b66dd588..63eac991616f687c1cedad98b6caf474767f915e 100644 (file)
@@ -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