DTL_WAIT comments
A wait identifier must be specified for each asynchronous, solicited, read/write operation when that function is called. The DTL_WAIT function waits for one or more of the expected wait identifiers (the wait identifiers corresponding to those specified in wait_mask) to become set.
Upon entry, if any one of the expected wait identifiers are set, the DTL_WAIT function returns immediately; otherwise, it completes all pending I/O operations before checking the expected wait identifiers again. If an I/O operation has not completed, the DTL_WAIT function suspends processing until more replies are available for I/O completion or until time expires.
When the DTL_WAIT function detects that one or more of the expected wait identifiers have become set, it zeros out and then sets the corresponding bits in the result mask.
The DTL_WAIT function does not clear any wait identifiers that have become set. If the client application wishes to wait on other expected wait identifiers, it must remove any wait identifiers that are set in the result mask by using the DTL_CLR_MASK function.
If the client application wishes to again wait on a wait identifier that has become set, it must first clear the wait identifier using the DTL_CLR_WID function.
Multiple I/O operations can be associated with a single wait identifier. The completion of any one of the I/O operations associated with that wait identifier will cause that wait identifier to become set and the DTL_WAIT function to return.
Each mask (wait identification mask and result mask) consists of two consecutive longwords. Bits are numbered from least significant (0) to most significant (31). Wait identifiers 1 through 31 are represented by bits 1 through 31 of the first longword; wait identifiers 32 through 40 are represented by bits 0 - 8 of the second longword. A wait identifier is set when its corresponding bit is logic 1. This signifies that the corresponding wait identifier will be monitored for completion.
The client application must check the final I/O completion status of every completed I/O operation to verify that no error occurred.
Provide Feedback