
26 Oct
2006
26 Oct
'06
11:08 p.m.
Peter Dimov wrote:
void unblock_all() { if( (volatile const long&)blocked_ > 0 ) { long k = InterlockedExchange( &blocked_, 0 );
if( k > 0 ) { ReleaseSemaphore( sema_rw_, 1, 0 );
This obviously should be ReleaseSemaphore( sema_rw_, k, 0 ); I'm not sure how this managed to pass the test at all.
} } }