Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
SPT_WRITEX(2) OSS System Calls Reference Manual
NAME
SPT_WRITEX - Writes data from an array in the application program to an open Guardian file
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_WRITEX (
short filenum,
char *buffer,
unsigned short write_count,
[unsigned short *count_written ],
[long tag ]
);
PARAMETERS
filenum specifies the file number of a Guardian file open instance that identifies the file to
be written.
buffer specifies an array in the application process in which the information to be writ-
ten to the file is stored before the call.
write_count specifies the number of bytes to be written.
count_written returns a count of the number of bytes written to the file from buffer.
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_WRITEX() function is the thread-aware version of the Guardian WRITEX procedure.
This function writes data from an array in the application program to an open Guardian file.
For programming information about the WRITEX procedure, see the Enscribe Programmer’s
Guide and the Guardian Programmer’s Guide.
Considerations
Buffer use SPT_WRITEX() is intended for use with 32-bit extended addresses. Therefore,
the data buffer for SPT_WRITE() can be either in the caller’s stack segment or
any extended data segment.
Waited I/O and SPT_WRITEX() calls
If a waited SPT_WRITEX() call is executed, the count_written parameter indi-
cates the number of bytes actually written.
Nowait I/O and SPT_WRITEX() calls
If a nowait SPT_WRITE () call is executed, count_written has no meaning and
can be omitted. The count of the number of bytes written is obtained when the
I/O operation completes through the count-transferred parameter of the Guar-
dian AWAITIOX procedure.
The SPT_WRITEX() function must complete with a corresponding call to the
Guardian AWAITIOX procedure when used with a file that is opened for nowait
7−478 Hewlett-Packard Company 527186-023