Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (s and S) spt_regFileIOHandler(2)
NAME
spt_regFileIOHandler - Registers the file number
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
spt_error_t spt_regFileIOHandler(
const short filenum,
const spt_FileIOHandler_p functionPtr);
PARAMETERS
filenum Specifies the Guardian file number for the file being registered
functionPtr Specifies user-supplied callback. This function must not block its invoking
thread; for example, it should not call the spt_awaitio() function
DESCRIPTION
This function registers the file number as one that the user will manage through a user-supplied
callback. This callback is invoked immediately after each I/O on filenum completes.
RETURN VALUES
SPT_SUCCESS
THe Guardian file number was successfully registered.
SPT_ERROR The value specified for filenum was less than 0 (zero).
SPT_ERROR filenum was already registered prior to this call.
SPT_ERROR The FILE_COMPLETE_SET_ procedure addition of filenum returned a nonzero
value.
SPT_ERROR functionPtr is NULL.
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this
reference page conform to the following industry standards:
• IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
527186-023 Hewlett-Packard Company 7−381