about summary refs log tree commit diff
path: root/nptl/semaphoreP.h
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/semaphoreP.h')
-rw-r--r--nptl/semaphoreP.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/nptl/semaphoreP.h b/nptl/semaphoreP.h
index 0d3f6e53a0..d14ea92c74 100644
--- a/nptl/semaphoreP.h
+++ b/nptl/semaphoreP.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -17,8 +17,10 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <semaphore.h>
 #include "pthreadP.h"
 
+
 /* Mount point of the shared memory filesystem.  */
 struct mountpoint_info
 {
@@ -26,16 +28,35 @@ struct mountpoint_info
   size_t dirlen;
 };
 
+/* Keeping track of currently used mappings.  */
+struct inuse_sem
+{
+  dev_t dev;
+  ino_t ino;
+  int refcnt;
+  sem_t *sem;
+  char name[0];
+};
+
 
 /* Variables used in multiple interfaces.  */
 extern struct mountpoint_info mountpoint attribute_hidden;
 
 extern pthread_once_t __namedsem_once attribute_hidden;
 
+/* The search tree for existing mappings.  */
+extern void *__sem_mappings attribute_hidden;
+
+/* Lock to protect the search tree.  */
+extern lll_lock_t __sem_mappings_lock;
+
 
 /* Initializer for mountpoint.  */
 extern void __where_is_shmfs (void) attribute_hidden;
 
+/* Comparison function for search in tree with existing mappings.  */
+extern int __sem_search (const void *a, const void *b) attribute_hidden;
+
 
 /* Prototypes of functions with multiple interfaces.  */
 extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value);