Allows kernel extensions to be notified of major process state transitions.
void handler (term, type, pid) struct proch *term; int type; pid_t pid;
term | Points to a proch structure used in the prochadd call. | ||||||||
type | Defines the process's state transition: initialization, termination, swap in, or swap out. These four values, defined in the /usr/include/sys/proc.h file, are as follows:
| ||||||||
pid | Defines the process ID of the process. |
For process initialization, the process state-change notification routine is called in the execution environment of a parent process for the initialization of a newly created child process. For kernel processes, the notification routine is called when the initp kernel service is called to complete initialization.
For process termination, the notification routines are called before the kernel handles default termination procedures. They are called in a LIFO order. The routines must be written so as not to allocate any resources under the terminating process. The notification routine is called under the process image of the terminating process.
The notification routine is activated for a swap in when a process has just been swapped in and is about to be put on the ready-to-run queue. At the point of call to the notification routine, the process's u block has been pinned.
The notification routine is activated for a swap out when a process is about to be swapped out. At the point of call to the notification routine, the process u block has not yet been unpinned.
This routine is part of Base Operating System (BOS) Runtime.
The prochadd kernel service, prochdel kernel service.
Kernel Extension and Device Driver Management Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.