The mi_udr_lock() function
The mi_udr_lock() function locks an instance of a UDR onto the virtual processor (VP) on which it begins execution.
Syntax
mi_integer mi_udr_lock(lock_flag)
mi_integer lock_flag;
- lock_flag
- The integer value to set the VP lock flag for the current instance
of the UDR. This flag can have either of the following values:
- MI_TRUE
- Sets the VP lock flag to prevent the routine manager from migrating the UDR instance to another VP
- MI_FALSE
- Unsets the VP lock flag to tell the routine manager that it can migrate the UDR when necessary
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_udr_lock() function
sets the VP lock flag to the value that lock_flag specifies.
The VP lock flag indicates whether to lock the routine instance of
a UDR to the current VP. The current VP is the VP on which the current
UDR is running. When the VP lock flag is MI_TRUE, the routine manager
does not allow the UDR instance to migrate to another VP.
Important: A value of MI_TRUE in the VP lock flag does not prevent
another instance of the UDR from executing on another VP.
Return values
- MI_OK
- The function was successful.
- MI_ERROR
- The function was not successful.