Re: Extra reference?

Tech-Archive recommends: Fix windows errors by optimizing your registry



The atomic decrement a generic semaphore would need (in any OS) has
more overhead than the atomic decrement or exchange the notification
event would need?

Yes, notifications events are even free from this decrement :) decrement is not
atomic, it is done under KiDispatcherLock anyway, since some decisions on
thread awakening must be done after increment anyway, and all of this must be
atomic - i.e. under spinlock.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

.