Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Interoperating Between Programming Environments
Open System Services Porting Guide520573-006
5-11
Guardian Procedures Extended for OSS Files
Guardian Procedures Extended for OSS Files
Some Guardian file system procedure calls are extended to manipulate OSS files:
FILE_GETINFO_
FILE_GETINFOBYNAME_
FILE_GETINFOLIST_
FILE_GETINFOLISTBYNAME_
FILE_OPEN_
FILE_OPEN_CHKPT_
SETMODE
The FILE_GET* procedures determine whether a file is an OSS file or a Guardian file.
Additionally, each provides slightly more specialized information. For instance, the
FILE_GETINFO_ procedure obtains a limited set of information about a file identified
by file number, and FILE_GETINFOLIST_ obtains detailed information about the file
identified by file number. The Guardian FILE_GETINFOBYNAME_ procedure identifies
Guardian objects, file attributes, processes, terminal names, and tape devices.
The FILE_OPEN_ procedure establishes a communication path between an
application process and a file; it also returns a file number to the caller. The file number
identifies the access path to the file in subsequent file-system calls. The FILE_OPEN_
procedure can be used to open OSS files. When it is used with the READX and
AWAITIOX procedures, data is read from an OSS file in nowait mode. The
FILE_OPEN_CHKPT_ procedure opens a designated file for a backup process.
The SETMODE procedure is used to set device-dependent properties.
Details on how to use these calls are provided in the Guardian Procedure Calls
Reference Manual. Also, examples for using some of these procedures are included in
the Open System Services Programmer’s Guide.
Native Signal Interoperability
Signals are software interrupts that provide a way of handling asynchronous events,
such as a user at a terminal typing an interrupt key, timer expiration, or abnormal
termination of a process.
Both OSS and Guardian native processes can send, receive, and handle signals using
the functions in the OSS API, which conform to the POSIX.1 standard. However, there
are some important differences, (mostly with respect to how Guardian processes
interact with signals) which are summarized as follows:
Control of a process over itself and other processes: an OSS process can control
(or send a signal to) itself using a function such as raise(), abort(), or
sleep(). An OSS process can also exercise control over another OSS process
by sending a signal to it using the kill() function.
A Guardian native process can use most of the signal functions in the OSS API to
send, receive, and handle signals but only for the purpose of exercising control