Verifies if any request of a table is complete.
a0tError a0TestAnyRequest( | | | |
| a0tRequest | *requestab[], | |
| int | size, | |
| int | *index );
| |
Name | rd/wr | Description |
requestab | write | Table of requests to test on. |
size | write | Size of the table. |
index | write | Result of the test. |
This function verifies if a one of the previous requests of a table has already completed. It doesn't block the calling thread, but verifies if one of the requests specified in requestab is completed. The size of the table must be specified in size. In the case of positive 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 a0TestAnyRequest() 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 or A0NoneCompleted if none of the requests completed. In the positive case, it also inserts in the respective completed request structure its final status (see a0GetRequestData()).
Error Code | Description |
A0Err...Some error occurred. | |
A0ErrOkSuccessful completion. | |
a0TestRequest() a0WaitAnyRequest() a0ISend() a0IReceive() a0ISendBuffer() a0IReceiveBuffer()