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

System Functions (s and S) SPT_CONTROL(2)
NAME
SPT_CONTROL - Performs device-dependent input/output operations
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_CONTROL (
short filenum,
short operation,
[ short param ],
[ long tag ]
);
PARAMETERS
filenum specifies the Guardian file number of a Guardian file open instance, identifying
the file on which the underlying CONTROL procedure performs an input or out-
put operation.
operation specifies a value from 1 through 27 that defines a type of operation to be per-
formed. For tables that list operation numbers and the possible param values for
each, see the description of the CONTROL procedure in the Guardian Pro-
cedure Calls Reference Manual.
param specifies a value that defines the operation to be performed. For tables that list
operation numbers and the possible param values for each, see the description of
the CONTROL procedure in the Guardian Procedure Calls Reference Manual.
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_CONTROL() function is the thread-aware version of the Guardian CONTROL pro-
cedure. CONTROL is used to perform device-dependent input or output operations.
If the SPT_CONTROL() function is used on a file that is opened for nowait I/O, the function
must be completed with a call to the AWAITIO procedure.
The following considerations apply to use on disk files:
Writing EOF to an unstructured file
Writing EOF to an unstructured disk file sets the EOF pointer to the relative byte
address indicated by the setting of the next-record pointer and writes the new
EOF setting in the file label on disk. (File pointer action for CONTROL opera-
tion 2, write EOF.)
File is locked If a CONTROL operation is attempted for a file locked through a filenum other
than that specified in the call to SPT_CONTROL(), the call is rejected with a
"file is locked" error 73. If any record is locked in a file, a call to
SPT_CONTROL() to write EOF (operation 2) to that same file will be rejected
with a "file is locked" error 73.
527186-023 Hewlett-Packard Company 7151