Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

unregister_callback(9r) [osf1 man page]

unregister_callback(9r) 												   unregister_callback(9r)

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
Routines: register_callback(9r) unregister_callback(9r)

Check Out this Related Man Page

Globus Callback Signal Handling(3)				   globus common				Globus Callback Signal Handling(3)

Globus Callback Signal Handling - Macros #define GLOBUS_SIGNAL_INTERRUPT Functions globus_result_t globus_callback_space_register_signal_handler (int signum, globus_bool_t persist, globus_callback_func_t callback_func, void *callback_user_arg, globus_callback_space_t space) globus_result_t globus_callback_unregister_signal_handler (int signum, globus_callback_func_t unregister_callback, void *unreg_arg) void globus_callback_add_wakeup_handler (void(*wakeup)(void *), void *user_arg) Detailed Description Macro Definition Documentation #define GLOBUS_SIGNAL_INTERRUPT Use this to trap interrupts (SIGINT on unix). In the future, this will also map to handle ctrl-C on win32. Function Documentation globus_result_t globus_callback_space_register_signal_handler (intsignum, globus_bool_tpersist, globus_callback_func_tcallback_func, void *callback_user_arg, globus_callback_space_tspace) Fire a callback when the specified signal is received. Note that there is a tiny delay between the time this call returns and the signal is actually handled by this library. It is likely that, if the signal was received the instant the call returned, it will be lost (this is normally not an issue, since you would call this in your startup code anyway) Parameters: signum The signal to receive. The following signals are not allowed: SIGKILL, SIGSEGV, SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGIOT, SIGPIPE, SIGEMT, SIGSYS, SIGTRAP, SIGSTOP, SIGCONT, and SIGWAITING persist If GLOBUS_TRUE, keep this callback registered for multiple signals. If GLOBUS_FALSE, the signal handler will automatically be unregistered once the signal has been received. callback_func the user func to call when a signal is received callback_user_arg user arg that will be passed to callback space the space to deliver callbacks to. Returns: o GLOBUS_CALLBACK_ERROR_INVALID_SPACE o GLOBUS_CALLBACK_ERROR_INVALID_ARGUMENT o GLOBUS_SUCCESS otherwise globus_result_t globus_callback_unregister_signal_handler (intsignum, globus_callback_func_tunregister_callback, void *unreg_arg) Unregister a signal handling callback. Parameters: signum The signal to unregister. unregister_callback the function to call when the callback has been canceled and there are no running instances of it (may be NULL). This will be delivered to the same space used in the register call. unreg_arg user arg that will be passed to callback Returns: o GLOBUS_CALLBACK_ERROR_INVALID_ARGUMENT if this signal was registered with persist == false, then there is a race between a signal actually being caught and therefor automatically unregistered and the attempt to manually unregister it. If that race occurs, you will receive this error just as you would for any signal not registered. o GLOBUS_SUCCESS otherwise void globus_callback_add_wakeup_handler (void(*)(void *)wakeup, void *user_arg) Register a wakeup handler with callback library. This is really only needed in non-threaded builds, but for cross builds should be used everywhere that a callback may sleep for an extended period of time. An example use is for an io poller that sleeps indefinitely on select(). If the callback library receives a signal that it needs to deliver asap, it will call the wakeup handler(s), These wakeup handlers must run as though they were called from a signal handler (don't use any thread utilities). The io poll example will likely write a single byte to a pipe that select() is monitoring. This handler will not be unregistered until the callback library is deactivated (via common). Parameters: wakeup function to call when callback library needs you to return asap from any blocked callbacks. user_arg user data that will be passed along in the wakeup handler Author Generated automatically by Doxygen for globus common from the source code. Version 14.7 Tue Nov 27 2012 Globus Callback Signal Handling(3)
Man Page