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

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 lenum,
short operation,
[ short param ],
[ long tag ]
);
PARAMETERS
filenum species the Guardian le number of a Guardian le open instance, identifying
the le on which the underlying CONTROL procedure performs an input or out-
put operation.
operation species a value from 1 through 27 that denes 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 species a value that denes 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 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_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 le 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 les:
Writing EOF to an unstructured file
Writing EOF to an unstructured disk le 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 le label on disk. (File pointer action for CONTROL opera-
tion 2, write EOF.)
File is locked If a CONTROL operation is attempted for a le locked through a lenum other
than that specied in the call to SPT_CONTROL(), the call is rejected with a
"le is locked" error 73. If any record is locked in a le, a call to
SPT_CONTROL() to write EOF (operation 2) to that same le will be rejected
with a "le is locked" error 73.
527186-007 Hewlett-Packard Company 7107