Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

unregister_callback(9r) [osf1 man page]

unregister_callback(9r) 												   unregister_callback(9r)

NAME
unregister_callback - General: Deregisters a configuration callback routine SYNOPSIS
int unregister_callback( void (*function) (), int point, int order, ulong argument ); ARGUMENTS
Specifies the name of the routine that you want to deregister. You must have previously registered this callback routine by calling regis- ter_callback. Specifies the execution point at which the kernel calls the callback routine previously registered by calling register_call- back. The execution point you pass to this argument must match the value you passed to the point argument in the call to register_callback. Specifies the order value that you specified in a previous call to register_callback. Specifies an argument that you want the kernel to pass to the callback routine that you previously registered by calling register_callback. The argument you pass to this argument must match the value you passed to argument in the call to register_callback. You would pass the integer constant 0L if you passed this in the previ- ous call to register_callback to indicate there is no argument. DESCRIPTION
The unregister_callback routine deregisters a kernel module's configuration callback routine. The kernel module previously registered its routine or routines by calling the register_callback routine. The values you pass to unregister_callback must be the same ones you previ- ously passed to register_callback to deregister a specific routine. Kernel modules call unregister_callback to deregister the callback rou- tine when it is no longer needed. A kernel module typically calls unregister_callback when it encounters a fatal error during static or dynamic configuration. The cfgmgr framework executes callback routines scheduled to run after single-user mode each time the system goes from multiuser mode to single-user mode and back to multiuser mode. You should unregister any callback routines if you do not want this to occur. NOTES
The kernel maintains an internal callback list that stores the values you pass to the register_callback routine. These callbacks remain registered until the user removes them. The unregister_callback routine searches through the callback list for the specified callback routine, the specified point, the specified order, and the specified argument and removes that routine from the list. RETURN VALUES
Upon successful completion, the unregister_callback routine returns the value ESUCCESS. Otherwise, unregister_callback returns the following error constant, defined in /usr/sys/include/sys/errno.h: The value you passed to the point argument is outside the minimum and maximum range. The callback you specified to be removed does not exist in the callback list. The callback you specified to be removed does not exist in the callback list. FILES
SEE ALSO
Routines: register_callback(9r) unregister_callback(9r)

Check Out this Related Man Page

register_callback(9r)													     register_callback(9r)

NAME
register_callback - General: Registers a configuration callback routine SYNOPSIS
int register_callback( void (*function) (), int point, int order, ulong argument ); ARGUMENTS
Specifies the name of the routine that you want called at a later time. Specifies the dispatch point at which the kernel calls this call- back routine. The kernel passes the value associated with this dispatch point to the kernel module's callback routine when it calls it. Specifies the order in which you want callback routines registered for the same dispatch point to be executed. The kernel passes the value associated with this order to the kernel module's callback routine when it calls it. You use this argument to control the order of execu- tion of multiple callback routine within each dispatch point. The register_callback routine executes a kernel module's callback routine for the same dispatch point in increasing numerical order of the value specified in the order argument. Specifies an argument that you want the kernel to pass to the kernel module'scallback routine when the kernel calls it. You pass the integer constant 0L to indicate that you do not want to pass an argument. DESCRIPTION
The register_callback routine registers a kernel module's callback routine. The kernel calls a kernel module's callback routine when execu- tion reaches the point specified in the point and order arguments. The kernel passes the values specified in the point and argument argu- ments to the kernel module's callback routine. Kernel modules implement one or more callback routines to handle the different dispatch points in the boot path. The dispatch point constants you can pass to the point argument are defined in the /usr/sys/include/sys/sysconfig.h file. The following ta- ble lists the dispatch point constants that kernel modules can use: The dispatch point is hardware preconfiguration. Tasks that do not require completion of hardware configuration can be performed at this dispatch point. The dispatch point is hardware postconfiguration. Tasks that require completion of hardware configuration can be performed at this dispatch point. The dispatch point is root file system available. Tasks that require completion of the root file system mount operation can be performed at this dispatch point. The order constants you can pass to the order argument are defined in the /usr/sys/include/sys/sysconfig.h file. The following table lists the order constants that kernel modules can use: This callback routine is registered at the lowest priority. Typically, you pass this con- stant with an appropriate offset. The kernel executes callback routines registered at this priority last. This callback routine is regis- tered at the highest priority. Typically, you pass this constant with an appropriate offset. The kernel executes callback routines regis- tered at this priority first. NOTES
The kernel maintains an internal callback list that stores the values you pass to the register_callback routine. These callbacks remain registered until the user removes them. Only statically configured kernel modules need to implement callback routines. Thus, only statically configured kernel modules need to call the register_callback routine. You typically call the cfgmgr_get_state routine to determine if the kernel module is in the dynamic configuration state or the static con- figuration state. RETURN VALUES
Upon successful completion, the register_callback routine returns the value ESUCCESS. Otherwise, register_callback returns one of the following error constants defined in /usr/sys/include/sys/errno.h: The system limit on the maximum number of callback requests was exceeded. To change the maximum number of callback requests, set the new value for the boot-time tunable parameter max_callbacks in the cm subsystem (located in the /etc/sysconfigtab database) and reboot the system. You can use the sysconfigdb utility to accomplish this task. The value you passed to the point argument is outside the minimum and maximum range. FILES
SEE ALSO
Kernel routines: cfgmgr_get_state(9r), unregister_callback(9r) register_callback(9r)
Man Page