Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

DescriptionProcedure
Places process into suspended statePROCESS_SUSPEND_
[Various process handle procedure calls]PROCESSHANDLE_*_
Creates unique process namePROCESSNAME_CREATE_
Sets caller's process loop-timer valueSETLOOPTIMER
When PROCESS_ACTIVATE_ and PROCESS_STOP_ are used on a target OSS process, they are
equivalent to kill(pid, SIGCONT) and kill(pid, SIGSTOP) respectively, including the
delivery of the SIGCHLD signal to the parent process.
The PROCESS_GETINFO_ and PROCESS_GETINFOLIST_ procedures can be used to get information
about OSS processes as well as Guardian processes. The attributes of an OSS process can be
modified using the PROCESS_SETINFO_ and PROCESS_SETSTRINGINFO_ procedures.
In addition, the following procedures create processes. These process-creation procedures can be
used in a Guardian program to create new processes that can then be manipulated by the
process-management functions. These procedures are discussed in detail in “Using Process-Creation
Calls” (page 96).
Creates a new Guardian processPROCESS_LAUNCH_
Creates a new OSS processPROCESS_SPAWN_
The Guardian Programmer’s Guide describes the use of these process-management procedures.
Sample programs showing the use of some of these Guardian process-management procedures
with OSS processes are shown in the Open System Services Programmer’s Guide.
Using OSS Functions in a Guardian Program
A Guardian program written in C normally uses Guardian procedure calls (documented in the
Guardian Procedure Calls Reference Manual) and run-time routines from the Guardian C run-time
library (documented in the Guardian TNS C Library Calls Reference Manual or the Guardian
Native C Library Calls Reference Manual). To add open features to a Guardian program, the
program can make use of OSS function calls (documented in the Open System Services System
Calls Reference Manual and Open System Services Library Calls Reference Manual).
This subsection discusses the criteria that determine which OSS functions can be used in a Guardian
program and how to use these functions.
The various C functions that are linked into a program have operational characteristics that depend
on the target environment (OSS or Guardian) and the subset of the language being used. The
normal behavior for a function in a given environment is to operate within a process of that
environment and on objects within that environment.
Many functions (such as mathematics and memory functions) behave the same, regardless of the
environment. However, some functions can operate within processes of the opposite environment,
or on objects of the opposite environment, to some extent.
Interoperability, as it relates to the use of functions, is defined as the use of a function that normally
operates in the opposite environment process, the use of a function on an object which lives in the
opposite environment, or mixing the use of both personalities inside the same program.
The criteria that affect API usage are described in the following subsections:
“Memory and Data Models to Be Used” (page 147)
“Process Target Type” (page 147)
“Use of Environment-Specific Functions ” (page 147)
“Object Type Being Manipulated” (page 148)
146 Migrating Guardian Applications to the OSS Environment