SDLock [ HP System Dictionary XL Intrinsics ] MPE/iX 5.0 Documentation
HP System Dictionary XL Intrinsics
SDLock
Locks the System Dictionary
Syntax
SDLock (Dcb,LockMode,Status)
Parameters
Dcb Required input; type = DcbType
This parameter passes information about the dictionary
to this intrinsic. It is initialized by the SDOpen
intrinsic.
LockMode Required input by value; type = 4 byte Integer
This parameter specifies the type of locking desired, as
shown below:
1. = attempt to lock the dictionary; wait until the
lock is successful or an error occurs.
2. = attempt to lock the dictionary; return an error
if the lock is not immediately successful.
Status Output; type = StatusType
This parameter contains information indicating the
success or failure of the intrinsic call. This
information is detailed in Table Table 3-1, located in
Chapter 3 of this manual.
Discussion
The following restrictions apply when using this intrinsic:
1. Open mode--The dictionary must be opened in either Shared Read
mode, or Shared Update mode.
2. Security--This intrinsic will succeed with any current scope.
3. The dictionary must be unlocked for this intrinsic to succeed when
lockmode = 2.
_________________________________________________________________
WARNING The following situation could result in a deadlock: Open
and lock a dictionary and then attempt to open the same
dictionary from the same process. If the calling program
has been prepped with MR capability, the second open will
cause a deadlock. If the calling program has not been
prepped with MR capability, the second open will simply
return an error.
_________________________________________________________________
Information on prepping programs is located in Chapter 2 of this manual,
under the heading "Programming Considerations" .
MPE/iX 5.0 Documentation