diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 11:49:16 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-31 13:41:58 -0700 |
commit | c28b227942b421ebdc03c9df9a012642fb517223 (patch) | |
tree | ec584e21d6fbc819353792d54a7dffb454029111 /module/avl | |
parent | 00b46022c676e402e3f33ce93ee2983bbad2c46f (diff) |
Add linux kernel module support
Setup linux kernel module support, this includes:
- zfs context for kernel/user
- kernel module build system integration
- kernel module macros
- kernel module symbol export
- kernel module options
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/avl')
-rw-r--r-- | module/avl/avl.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/module/avl/avl.c b/module/avl/avl.c index dd39c12d2..e000647be 100644 --- a/module/avl/avl.c +++ b/module/avl/avl.c @@ -1028,3 +1028,30 @@ done: return (AVL_NODE2DATA(node, off)); } + +#if defined(_KERNEL) && defined(HAVE_SPL) + +static int avl_init(void) { return 0; } +static int avl_fini(void) { return 0; } + +spl_module_init(avl_init); +spl_module_exit(avl_fini); + +MODULE_DESCRIPTION("Generic AVL tree implementation"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_LICENSE(ZFS_META_LICENSE); + +EXPORT_SYMBOL(avl_create); +EXPORT_SYMBOL(avl_find); +EXPORT_SYMBOL(avl_insert); +EXPORT_SYMBOL(avl_insert_here); +EXPORT_SYMBOL(avl_walk); +EXPORT_SYMBOL(avl_first); +EXPORT_SYMBOL(avl_last); +EXPORT_SYMBOL(avl_nearest); +EXPORT_SYMBOL(avl_add); +EXPORT_SYMBOL(avl_remove); +EXPORT_SYMBOL(avl_numnodes); +EXPORT_SYMBOL(avl_destroy_nodes); +EXPORT_SYMBOL(avl_destroy); +#endif |