Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

SPT_CANCEL(2) OSS System Calls Reference Manual
NAME
SPT_CANCEL - Cancels the oldest incomplete operation on a Guardian file opened for nowait
I/O
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 filenum);
PARAMETERS
filenum specifies the Guardian le number of a Guardian file 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
file opened for nowait I/O. The canceled operation might or might not have had effects. For disk
files, the file position might or might not be changed.
For programming information about the Guardian CANCEL procedure, see the Guardian
Programmer’s 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 file, which could result in the loss
of a record from the queue file. For audited queue files only, your application
can recover from a timeout error by calling the
SPT_ABORTTRANSACTION() function, when detecting Guardian file-
system error 40, to ensure that any dequeued records are reinserted into the file.
For nonaudited queue files, 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 files.
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 identifies 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. For details about system message -38, see the Guardian Procedure
Errors and Messages Manual.
RETURN VALUES
The SPT_CANCEL() 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.
7138 Hewlett-Packard Company 527186-023