module: add exitcall function
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
e8de5a33af
commit
3abfd32fbb
6 changed files with 110 additions and 11 deletions
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#define DRIVER_ENTRY(fn) static void (*__initcall_##fn)(void) __attribute((used, section(".initcall"))) = fn
|
||||
#define DRIVER_ENTRY_PRIORITY(fn, pr) static void (*__initcall_##fn)(void) __attribute((used, section(".initcall." #pr))) = fn
|
||||
#define DRIVER_EXIT(fn) static void (*__exitcall_##fn)(void) __attribute((used, section(".exitcall"))) = fn
|
||||
|
||||
#define DRIVER_PCI 1
|
||||
|
||||
|
|
@ -24,9 +25,10 @@ struct driver {
|
|||
void *deinit_device;
|
||||
};
|
||||
|
||||
int driver_register(const char *name, u32 type, void *init, void *deinit, u32 class);
|
||||
struct driver *driver_register(const char *name, u32 type, void *init, void *deinit, u32 class);
|
||||
struct driver *driver_find(u32 type, u32 class);
|
||||
int driver_load(const char *name);
|
||||
int driver_unload(const char *name);
|
||||
|
||||
extern struct ksym kernel_symtab[];
|
||||
extern size_t kernel_symtab_count;
|
||||
|
|
|
|||
Loading…
Reference in a new issue