HPlogo MPE/iX Intrinsics Reference Manual > Chapter 8 Command Definitions (HPMERGEEND-LOGSTATUS)

LOCKLOCRIN

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable.

Locks a local resource identification number (RIN).

Syntax



              I16V    U16
  LOCKLOCRIN (rinnum, lockflag);

Parameters


rinnum

16-bit signed integer by value (required)

A previously allocated local RIN; valid values range from 1 to the value specified in the rincount parameter of the GETLOCRIN intrinsic.

lockflag

16-bit unsigned integer by reference (required)

Passes and returns conditional or unconditional RIN locking specification through bit (15:1).

ValueMeaning
0Locking takes place only if the RIN is currently unlocked. If the RIN is not unlocked, control returns to the calling process immediately with the condition code CCG (0).
1Locking takes place unconditionally. If the RIN is currently locked, the calling process suspends until the RIN becomes unlocked.

All other bits are ignored. See the discussion of condition codes for the values returned in lockflag.

Operation Notes


Any local RIN assigned to a job can be locked, one process at a time, by using the LOCKLOCRIN intrinsic. When this is done, other processes within the job that attempt to lock that RIN are suspended until the locked RIN is released.

Condition Codes


The following condition codes are possible if lockflag bit (15:1)=1:

CCE (2)Request granted. If the calling process has already locked the RIN, lockflag bit (15:1) is set to 1. If the RIN is free, lockflag bit (15:1) is set to 0.
CCG (0)Not returned.
CCL (1)Request denied. The RIN is invalid; the rinnum was too large, no local RIN was allocated, or rinnum specified a number less than or equal to zero.

The following condition codes are possible if lockflag bit (15:1)=0:

CCE (2)Request granted. If the calling process has already locked the RIN, lockflag bit (15:1) is set to 1. If the RIN is free, lockflag bit (15:1) is set to 0.
CCG (0)Request denied. The RIN was locked by another process.
CCL (1)Request denied. The RIN is invalid; the rinnum was too large, no local RIN was allocated, or rinnum specified a number less than or equal to zero.

Related Information


Intrinsics FREELOCRIN, GETLOCRIN, LOCRINOWNER, UNLOCKLOCRIN, LOCKGLORIN, UNLOCKGLORIN
Manuals Resource Management Programmer's Guide




LOCKGLORIN


LOCRINOWNER