4 s26_schedexecuteisresponded(), 5 s26_schedexecutewait(), 6 s26_schedexecutefinish() – Sensoray 2600 User Manual
Page 23

Sensoray 2600 Programming Guide
19
Gateway Transaction Control
Prototype:
u32 S26_SchedExecuteStart( XACT x );
Returns:
Error code as described in section 5.5. Zero is returned if the operation was successful.
Notes:
S26_SchedExecuteStart()
sends the transaction’s gateway command packet to the MM and then returns
immediately. It can be called in place of
S26_SchedExecute()
by threads that must not block while transactions
are in progress.
After calling this function,
S26_SchedExecuteIsResponded()
can be called in a non-blocking polling loop to
determine when the gateway response packet has been received and is ready for processing. Alternately,
S26_SchedExecuteWait
() can be called to block the calling thread until the response packet is received. When the
response packet has been received,
S26_SchedExecuteFinish()
can be called to complete the transaction.
Example:
See section 6.2.6.
6.2.4 S26_SchedExecuteIsResponded()
Function:
Determines whether a gateway response packet has been received.
Prototype:
u32 S26_SchedExecuteIsResponded( XACT x );
Returns:
True (1) if a packet has been received, or false (0) if no packet has been received.
Notes:
This function indicates the availability of a received gateway response packet for the specified transaction. It can
be called by threads that must not block while transactions are in progress. The specified transaction should
already be executing as a result of a prior call to
S26_SchedExecuteStart()
.
Example:
See section 6.2.6.
6.2.5 S26_SchedExecuteWait()
Function:
Waits for a gateway response packet to be received.
Prototype:
u32 S26_SchedExecuteWait( XACT x, u32 msec );
Returns:
Error code as described in section 5.5. Zero is returned if the operation was successful.
Notes:
This function waits for a received gateway response packet or a time-out, whichever occurs first. The calling
thread will block until a packet is received or the receive times out. The specified transaction should already be
executing as a result of a prior call to
S26_SchedExecuteStart()
.
Example:
See section 6.2.6.
6.2.6 S26_SchedExecuteFinish()
Function:
Processes a received gateway response packet.
Parameter
Type
Description
x
void *
Transaction handle obtained from S26_SchedOpen().
Parameter
Type
Description
x
void *
Transaction handle obtained from S26_SchedOpen().
Parameter
Type
Description
x
void *
Transaction handle obtained from S26_SchedOpen().
msec
u32
Maximum time to wait for the gateway response packet, in milliseconds, before
declaring a time-out.