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

System Functions (s and S) spt_vprintfx(2)
NAME
spt_vprintfx - Formats a variable number of parameters for output (thread-aware version)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <stdarg.h>]
[#include <stdio.h>]
#include <spthread.h>
int spt_vprintfx (
const char *format,
va_list printarg
);
PARAMETERS
format Species a character string that contains two types of objects:
Plain characters, which are copied to the output stream.
Conversion specications, each of which causes zero or
more items to be fetched from the stdarg parameter
lists.
printarg Species the parameters to be printed.
DESCRIPTION
The spt_vprintfx() function is the thread-aware version of the vprintf( ) function.
The spt_vprintfx() function formats and writes stdarg parameter lists.
This function is the same as the spt_printfx() function, except that it is not called with a vari-
able number of parameters. Instead, it is called with a parameter list pointer as dened by stdarg.
RETURN VALUES
Upon successful completion, this function returns the number of bytes in the output string. Oth-
erwise, a negative value is returned.
If the le descriptor underlying stdout becomes invalid (is closed by another thread), -1 is
returned with an errno value of [EBADF]. If a signal is received via the pthread_kill() function
and is not blocked, ignored, or handled, -1 is returned with an errno value of [EINTR].
ERRORS
The spt_vprintfx() function fails if the standard output stream is unbuffered, or if the buffer
needed to be ushed and the function call caused an underlying spt_writex() or lseek() function
to be invoked. In addition, if the spt_vprintfx() function fails, errno is set to one of the follow-
ing values:
[EAGAIN] The O_NONBLOCK ag is set for the le descriptor underly-
ing the output stream and the process would be delayed in the
write operation.
527186-005 Hewlett-Packard Company 7329