Providing recovery for the latch manager

When you use the latch manager to serialize resources, your application must provide recovery to handle errors that can occur when the application code or the latch manager is in control. For performance reasons, and because SRB routines might not want to release owned latches when errors occur, the system does not release owned latch requests during task or address space termination. The system does, however, release pending latch requests when the requestor's home address space terminates. The recovery you provide can be either an ESTAE-type or a functional recovery routine (FRR). The following example shows pseudocode for an application that calls the latch manager services and its associated FRR.

Guideline: The procedure that follows shows the exact method for ensuring recovery for the Latch_Obtain and Latch_Release functions.

For information about how to provide a resource manager recovery routine, see Providing recovery.