Open System Services System Calls Reference Manual (G06.28+, H06.05+)

SPT_UNLOCKREC(2) OSS System Calls Reference Manual
NAME
SPT_UNLOCKREC - unlocks a Guardian le 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 lenum,
[long tag ]
);
PARAMETERS
filenum species the Guardian le number of a Guardian le open
instance for the le containing the record you want unlocked.
tag is for nowait I/O only. The tag value you dene uniquely
identies 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 specied le currently locked by
the user. The user is dened either as the opener of the le (identied by the lenum value used)
if the le is not audited, or by the transaction (identied by the TRANSID) if the le is audited.
This call unlocks the record at the current position in the le, allowing other users to access that
record. This call has no affect on a record of an audited le if the current transaction has
modied that record.
For programming information about the Guardian UNLOCKREC le-system procedure, see the
Enscribe Programmers Guide and the Guardian Programmers 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 le that is opened for nowait I/O.
Locking queue 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, the user
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.
7330 Hewlett-Packard Company 527186-007