[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Kentry



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 following:

#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.

Any comments?

--
Semper Fidelis

Adam Klobukowski
atari@gabo.pl