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

SPT_UNLOCKFILE(2) OSS System Calls Reference Manual
NAME
SPT_UNLOCKFILE - Unlocks a disk le and any records in that le 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_UNLOCKFILE (
short lenum,
[long tag ]
);
PARAMETERS
filenum species the Guardian le number of a Guardian le open
instance for the le that 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_UNLOCKFILE() function is the thread-aware version of the Guardian UNLOCK-
FILE procedure.
The SPT_UNLOCKFILE() function unlocks a disk le and any records in that 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. Unlocking a le allows other processes to access the le. This call has no affect on
an audited le if the current transaction has modied that le.
For programming information about the Guardian UNLOCKFILE le-system procedure, see the
Enscribe Programmers Guide and the Guardian Programmers Guide.
Considerations
Nowait and SPT_UNLOCKFILE()
The SPT_UNLOCKFILE() 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 le, the pro-
cess 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 next user in the locking queue is
waiting to:
lock the le or lock a record in the le, the user is
granted the lock (which excludes other users from
accessing the le) and resumes processing.
7328 Hewlett-Packard Company 527186-007