From da4aea0b5e60ec2351367b0facee24e6035a7129 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 3 Feb 2021 13:50:21 -0300 Subject: pthread: Refactor semaphore code The internal semaphore list code is moved to a specific file, sem_routine.c, and the internal usage is simplified to only two functions (one to insert a new semaphore and one to remove it from the internal list). There is no need to expose the internal locking, neither how the semaphore mapping is implemented. No functional or semantic change is expected, tested on x86_64-linux-gnu. --- htl/semaphoreP.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'htl/semaphoreP.h') diff --git a/htl/semaphoreP.h b/htl/semaphoreP.h index 3d6efcdec7..4b13f7b30d 100644 --- a/htl/semaphoreP.h +++ b/htl/semaphoreP.h @@ -21,27 +21,6 @@ #define SEM_SHM_PREFIX "sem." -/* Keeping track of currently used mappings. */ -struct inuse_sem -{ - dev_t dev; - ino_t ino; - int refcnt; - sem_t *sem; - char name[]; -}; - - -/* The search tree for existing mappings. */ -extern void *__sem_mappings attribute_hidden; - -/* Lock to protect the search tree. */ -extern int __sem_mappings_lock attribute_hidden; - - -/* Comparison function for search in tree with existing mappings. */ -extern int __sem_search (const void *a, const void *b) attribute_hidden; - static inline void __new_sem_open_init (struct new_sem *sem, unsigned value) { /* This always is a shared semaphore. */ -- cgit v1.2.3