Subj : Re: NPTL2 or something To : comp.programming.threads From : Joseph Seigh Date : Tue Jan 04 2005 07:33 am On Tue, 04 Jan 2005 07:12:47 GMT, SenderX wrote: >> Windows >> doesn't have anything like pthread_cancel so I don't include one. >> Anyway >> the >> eventcount api for windows is different than the unix one, there's no >> point >> in making them the same. > > The eventcount for windows uses atomic_ptr correct? A simple eventcount > for > linux could use use futex's directly. I recently posted some *broken > pseudo-code for a windows eventcount a while back that used an event > per-thread to build its waitsets. That limits it to SCHED_OTHER. I was > thinking of using your idea of a semaphore per-eventcount generation. I > believe you posted some windows condvar code that used a semaphore > per-waitset. I think you used a simple reference count to determine when > it > was ok to give up the current waitsets semaphore. That should get rid of > SCHED_OTHER only. The eventcount for windows uses win32 Events so it is broadcast only. I have to plans to do a Sempahore based one to allow single wakeups with signal at this time. It's more complicated logic to keep it lock-free. The semaphore based condvar code I posted before used critical sections for locking. Joe Seigh .