Waits for any request of a table to complete.
a0tError || a0WaitAnyRequest( |
|| a0tRequest || *requestab, |
|| int || size, |
|| int || *index );
|requestab||write||Table of requests to wait for.|
|size||write||Size of the table.|
|index||write||Result of the wait.|
This function blocks the calling thread until one of the previous requests specified in the table requestab has already completed. The size of the table must be specified in size. After the completion of one of the requests, it can't be waited or tested anymore.
The table requesttab must be constructed by the caller thread with pointers to all the requests to be tested. After a completed request, the caller thread doesn't need to bother to rebuild the table to reuse it. The function a0WaitAnyRequest() replaces the pointer of the completed request by NULL and it doesn't complaint if a pointer is NULL in requestab. Though, a NULL pointer is also counted in size.
It returns in index the index of the completed request in the table. It also inserts in the respective completed request structure its final status (see a0GetRequestData()).
A0Err...||Some error occurred.|
a0WaitRequest() a0TestAnyRequest() a0ISend() a0IReceive() a0ISendBuffer() a0IReceiveBuffer()