Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (n - p) PUT_LOCKREC(2)
Record pointers after a call to PUT_LOCKREC( )
After a call to PUT_LOCKREC(), the current-record, next-
record, and end-of-file pointers remain unchanged.
Ways to avoid or resolve deadlocks
One way to avoid deadlock is to call function 4 of the
PUT_SETMODE() procedure to establish one of the alternate
locking modes. A common method of avoiding deadlock situa-
tions is to lock records in some predetermined order. Deadlocks
can be resolved if you lock records using a nowait open and call
the Guardian AWAITIO procedure with a timeout specified.
Use on OSS Objects
This procedure operates only on Guardian objects. If an OSS file is specified, Guardian file-
system error 2 occurs.
RETURN VALUES
The PUT_LOCKREC( ) function returns 0 (zero) upon successful completion. Otherwise, this
function returns a nonzero Guardian file-system error number that indicates the outcome of the
operation.
For information about Guardian file-system error numbers, see the Guardian Procedure Errors
and Messages Manual.
ERRORS
None. This function does not set the errno variable.
RELATED INFORMATION
Functions: PUT_CANCEL(2), PUT_CONTROL(2), PUT_FILE_CLOSE_(2),
PUT_FILE_OPEN_(2), PUT_LOCKFILE(2), PUT_READLOCKX(2),
PUT_READUPDATELOCKX(2), PUT_READUPDATEX(2), PUT_READX(2),
PUT_SETMODE(2), PUT_UNLOCKFILE(2), PUT_UNLOCKREC(2),
PUT_WRITEREADX(2), PUT_WRITEUPDATEUNLOCKX(2),
PUT_WRITEUPDATEX(2), PUT_WRITEX(2).
527186-023 Hewlett-Packard Company 5−231