* Reworked the way sem_undo requests are processed by following

Ingo suggestions: instead of having one global sem_undo list,
  we now have two local list, one per semaphore set and one per team
  which is held in its xsi_sem_context structure, along with a mutex.
  A mutex has also been added to the semaphore set class in order to
  protect the local list, but also in order to (hopefully) improve
  concurrency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26993 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Salvatore Benedetto
2008-08-16 18:20:54 +00:00
parent ee8d227588
commit 6ae7f6879f
4 changed files with 350 additions and 276 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
__BEGIN_DECLS
extern void xsi_ipc_init();
extern void xsi_sem_undo(team_id teamID, int32 numberOfUndos);
extern void xsi_sem_undo(struct team *team);
/* user calls */
int _user_xsi_semget(key_t key, int numberOfSemaphores, int flags);
+2 -1
View File
@@ -67,6 +67,7 @@ struct image; // defined in image.c
struct realtime_sem_context; // defined in realtime_sem.cpp
struct select_info;
struct user_thread; // defined in libroot/user_thread.h
struct xsi_sem_context; // defined in xsi_semaphore.cpp
struct death_entry {
struct list_link link;
@@ -183,7 +184,7 @@ struct team {
int32 flags;
void *io_context;
struct realtime_sem_context *realtime_sem_context;
int32 xsi_sem_undo_requests;
struct xsi_sem_context *xsi_sem_context;
sem_id death_sem; // semaphore to wait on for dying threads
struct list dead_threads;
int dead_threads_count;