* 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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user