* Removed select_sync::lock. The only thread that was still locking was

the selecting thread, which has obviously no effect.
* Changed select_info::events to vint32. It is now updated atomically.
  This removes a race condition when concurrent threads would notify at
  the same time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25273 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-04-30 16:12:20 +00:00
parent a1e3e17d35
commit 514fb1360b
2 changed files with 148 additions and 33 deletions
+1 -2
View File
@@ -17,13 +17,12 @@ struct select_sync;
typedef struct select_info {
struct select_info* next; // next in the object's list
struct select_sync* sync;
vint32 events;
uint16 selected_events;
uint16 events;
} select_info;
typedef struct select_sync {
vint32 ref_count;
benaphore lock;
sem_id sem;
uint32 count;
struct select_info* set;