For some kernel objects, a successful call to
WaitForMultipleObjects actually alters the state of the object. A successful call is one in which the function sees that the object was signaled and returns a value relative to
WAIT_OBJECT_0. A call is unsuccessful if the function returns
WAIT_FAILED. Objects never have their state altered for unsuccessful calls.
When an object has its state altered, I call this a successful wait side effect. For example, let’s say that a thread is waiting on an auto-reset event object (discussed later in this chapter). When the event object becomes signaled, the function detects this and can return
WAIT_OBJECT_0 to the calling thread. However, just ...