Keyed Events

 Keyed Events:

Keyed Events are the final synchronization method which I will be discussing for now, they are undocumented by Microsoft, and therefore reserved for their own use. Keyed Events are like Event Synchronization dispatcher objects but with a special unique identifier called a Key.

Keyed Events can be either be Signaled or Non-Signaled states like other dispatcher objects, however, when a thread sets the object to the Signaled state, it is achieved by setting the Key associated with the Event Object, and then releasing the thread which was waiting upon the Key. The thread being released must be within the same process as the signaling with the Key.

Keyed Events often have a Critical Section associated with them, which uses the address of the address of the Key as the address of Critical Section. Only waiting threads (or waiters) within the same process are awakened, and only one thread is released at a time.

The NtWaitForKeyedEvent is used to wait upon a Keyed Event. 

When a Keyed Event needs to perform a wait itself, then it uses a Semaphore which can be found within the ETHREAD data structure with a KeyedWaitSemaphore field. 

The KeyedWaitChain field is used to store a doubly linked list of waiting threads for the Keyed Event.


Windows keyed events, critical sections, and new Vista synchronization features


About 0x14c

I'm currently a Software Developer. My primary interests are Graph Theory, Number Theory, Programming Language Theory, Logic and Windows Debugging.
This entry was posted in Windows Internals. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s