Registers a callout handler.
#include <sys/proc.h>
int proch_reg(struct prochr *)
If the same struct prochr * is registered more than once, only the most recently specified information is retained in the kernel.
The struct prochr * is not copied to a new location in memory. As a result, if the structure is changed, results are unpredictable. This structure does not need to be pinned.
The primary consideration for the new-style interface is to improve scalability. A lock is only acquired when callouts are made. A summary mask of all currently registered callout event types is maintained. This summary mask is updated every time proch_reg or proch_unreg is called, even when registering an identical struct prochr *. Further, the lock is a complex lock, so once callouts have been registered, there is no lock contention in invoking them because the lock is held read-only.
When a callout to a registered handler function is made, the parameters passed are:
On successful completion, the proch_reg kernel service returns a value of 0. The only error (non-zero) return is from trying to register with a NULL pointer.
The proch_reg kernel service can be called from the process environment only.
The proch_unreg kernel service.
The Process State-Change Notification Routine.
Kernel Extension and Driver Management Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.