TMF Application Programmer's Guide (G06.26+)

Designing Multithreaded Processes
HP NonStop TMF Application Programmer’s Guide522419-005
3-11
Checkpointing Strategy
The ENDTRANSACTION Code
When the MAINLOOP code receives indication that the final nowait WRITEREAD call
for a transaction has completed successfully, control passes to the
ENDTRANSACTION code. The major functions of the ENDTRANSACTION code are
as follows:
1. Issue a RESUMETRANSACTION call, specifying the tag value returned by the
AWAITIO completion.
2. Issue an ENDTRANSACTION call to commit the transaction.
3. Return control to the MAINLOOP code.
The ABORTTRANSACTION Code
If the MAINLOOP code detects an unsuccessful AWAITIO completion, control passes
to the ABORTTRANSACTION code. The major functions of the
ABORTTRANSACTION code are as follows:
1. Issue a RESUMETRANSACTION call, specifying the tag value returned by the
AWAITIO completion.
2. Issue an ABORTTRANSACTION call to abort the transaction.
3. Issue a CHECKPOINT call (containing the filenumber of the TFILE in the
parameter list) to flush the entry for the aborted transaction from the backup
requester’s TFILE.
4. Delete the transaction tag from the list of active transactions in local storage.
5. Return control to the MAINLOOP code.