Open System Services System Calls Reference Manual (G06.28+)
System Functions (s and S) SPT_UNLOCKREC(2)
NAME
SPT_UNLOCKREC - unlocks a Guardian file record currently locked by the user
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <cextdecs.h>]
#include <spthread.h>
short SPT_UNLOCKREC (
short filenum,
[long tag ]
);
PARAMETERS
filenum specifies the Guardian file number of a Guardian file open
instance for the file containing the record you want unlocked.
tag is for nowait I/O only. The tag value you define uniquely
identifies the operation associated with this call.
This parameter is supported only for program compatibility; if
you provide it, it is ignored.
DESCRIPTION
The SPT_UNLOCKREC() function is the thread-aware version of the Guardian UNLOCKREC
procedure.
The SPT_UNLOCKREC() function unlocks a record in the specified file currently locked by
the user. The user is defined either as the opener of the file (identified by the filenum value used)
if the file is not audited, or by the transaction (identified by the TRANSID) if the file is audited.
This call unlocks the record at the current position in the file, allowing other users to access that
record. This call has no affect on a record of an audited file if that record has been modified by
the current transaction.
For programming information about the Guardian UNLOCKREC file-system procedure, see the
Enscribe Programmer’s Guide and the Guardian Programmer’s Guide.
Considerations
File opened nowait and SPT_UNLOCKREC()
The SPT_UNLOCKREC() function must complete with a
corresponding call to the Guardian AWAITIOX procedure when
used with a file that is opened nowait.
Queuing processes and SPT_UNLOCKREC()
If any users are queued in the locking queue for the record, the
user at the head of the locking queue is granted access and is
removed from the queue (the next read or lock request moves to
the head of the queue).
If the user granted access is waiting to lock the record, it is
granted the lock (which excludes other process from accessing
the record) and resumes processing. If the user granted access is
waiting to read the record, its read is processed.
527186-005 Hewlett-Packard Company 7−317