From: Michael Wookey Date: Wed, 04 Nov 2009 08:48:35 GMT Subject: Re: [PATCH 1/1] MSVC: port pthread code to native Windows threads Message-ID: In-Reply-To: <4AF13819.7050306@viscovery.net> 2009/11/4 Johannes Sixt : > Andrzej K. Haczewski schrieb: > >> +static __inline int win32_cond_init(win32_cond_t *cond) >> +{ >> +     cond->waiters = 0; >> + >> +     InitializeCriticalSection(&cond->waiters_lock); >> + >> +     cond->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL); > > Wouldn't an Event object be lighter-weight? (I'm only guessing.) Both events and semaphores resolve to wait-able kernel objects; so neither is "lighter-weight" than the other.