[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I'd like to add to kentry/kentry_module:
long _cdecl (*register_shutdown)(long _cdecl (*on_shutdown)(long mode));
Module (device driver or such) could register a function that can be
executed at system shutdown, or module unload. "mode" parameter can be
#define SHUTOWN 0 /* system is going down, all processes are killed, all
file descriptors closed */
#define UNLOAD 1 /* just unload module. System is fully operational and
should be operational after this function */
All other values are reserved. If on_shutdown function will get any
other value, it should exit at once returning E_OK.
on_shutdown return value should be E_OK if function succeded, or error
value if it didn't.