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

SPT_CANCEL(2) OSS System Calls Ref
erence Manual
NAME
SPT_CANCEL - cancels the oldest incomplete operation on a Guardian le opened nowait
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_CANCEL (
short lenum);
PARAMETERS
filenum species the Guardian le number of a Guardian le open instance whose oldest
incomplete operation you want to cancel
DESCRIPTION
The SPT_CANCEL() function is the thread-aware version of the Guardian CANCEL procedure.
The SPT_CANCEL() function is used to cancel the oldest incomplete operation on a Guardian
le opened nowait. The canceled operation might or might not have had effects. For disk les,
the le position might or might not be changed.
For programming information about the Guardian CANCEL procedure, see the Guardian
Programmers Guide.
Considerations
Queue files If an SPT_READUPDATELOCKX() function operation is canceled using the
SPT_CANCEL() function, the SPT_READUPDATELOCKX() call might
already have deleted a record from the queue le, which could result in a loss of
a record from the queue le. For audited queue les only, your application can
recover from a timeout error by calling the SPT_ABORTTRANSACTION()
function, when detecting Guardian le-system error 40, to ensure that any
dequeued records are reinserted into the le.
For nonaudited queue les, there is no recovery of a lost record. Thus, your
application should never call the Guardian AWAITIOX procedure with a time
limit greater than 0 (zero) if an SPT_READUPDATELOCKX() call is pending.
The SPT_ABORTTRANSACTION() recovery procedure does not work on
nonaudited queue les.
Messages The server process (that is, a process that was opened and to which the I/O
request was sent) receives a system message -38 (queued message cancellation)
that identies the canceled I/O request, if it has requested receipt of such mes-
sages. If the server has already replied to the I/O request, message -38 is not
delivered. See the Guardian Procedure Errors and Messages Manual for details
about system message -38.
RETURN VALUES
The SPT_CANCEL() function returns 0 (zero) upon successful completion. Otherwise, this
function returns a nonzero Guardian le-system error number that indicates the outcome of the
operation.
For information about Guardian le-system error numbers, see the Guardian Procedure Errors
and Messages Manual.
794 Hewlett-Packard Company 527186-005