Allows kernel extensions to be notified of major process and thread state transitions.
void prochadd_handler ( term, type, id)
struct proch *term;
int type;
long id;
void proch_reg_handler ( term, type, id)
struct prochr *term;
int type;
long id;
term | Points to the proch structure used in the prochadd call or to the prochr structure used in the proch_reg call. |
type | Defines the state change event being reported: process initialization,
process termination, process exec, thread initialization, or thread termination.
These values are defined in the /usr/include/sys/proc.h
file. The values that may be passed as type also depend
on how the callout is requested.
Possible prochadd_handler type values:
Possible proch_reg_handler type values: |
id | Defines either the process ID or the thread ID. |
The notification callout is set up by using either the prochadd or the proch_reg kernel service. If you request the notification using the prochadd kernel service, the callout follows the syntax shown first as prochadd_handler. If you request the notification using the proch_reg kernel service, the callout follows the syntax shown second as proch_reg_handler.
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. 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 prochadd kernel service, prochdel kernel service, proch_reg kernel service, proch_unreg kernel service.
Kernel Extension and Device Driver Management Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.