OpenTP1 Version 7 Programming Guide
If lock is specified for a resource by using the function dc_lck_get(), the resource lock right is transferred sequentially from one transaction branch to another in a global transaction. This facility is called lock migration. Lock migration prevents a deadlock or lock wait between transaction branches. Therefore, once lock is specified for a resource in a global transaction, the resource can be accessed from any transaction branch in the global transaction as long as the specification is in effect.
Lock migration is ensured in the following cases:
With lock migration, if the EX mode is specified in another transaction branch after lock has been specified in PR mode, all the subsequent lock is in EX mode. In a global transaction, once resources are put under lock in EX mode, the resource cannot be put under lock in PR mode. All resources are under lock in EX mode.
If resources are under lock with lock migration specified, they are automatically released when the global transaction terminates. If the resources can be released before the termination of the global transaction, take the following procedures:
Do not access a resource for which lock has been specified (access to an already allocated resource or a new lock request) in the following case:
The figure below shows lock migration.
Figure 4-23 Outline of lock migration
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.