From 8f6008b4824400d3bf78235525058d27c55fb2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 29 Nov 2002 08:27:25 +0000 Subject: [PATCH] We now have our own (and cleaner) modules.h file. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2111 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/drivers/module.h | 69 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/headers/os/drivers/module.h b/headers/os/drivers/module.h index 7ab759ea14..a725708a47 100644 --- a/headers/os/drivers/module.h +++ b/headers/os/drivers/module.h @@ -1,51 +1,48 @@ -/******************************************************************************* -/ -/ File: modules.h -/ -/ Description: Public module-related API -/ -/ Copyright 1998, Be Incorporated, All Rights Reserved. -/ -*******************************************************************************/ +/* Modules Definitions +** +** Distributed under the terms of the OpenBeOS License. +*/ #ifndef _MODULE_H #define _MODULE_H -#include + #include + +/* module info structure + * Every module exports it - modules are identified + * by the name given in this structure. + * It exports the functions that the module support. + */ + +typedef struct module_info { + const char *name; + uint32 flags; + status_t (*std_ops)(int32, ...); +} module_info; + +/* module standard operations */ +#define B_MODULE_INIT 1 +#define B_MODULE_UNINIT 2 + +/* module flags */ +#define B_KEEP_LOADED 0x00000001 + + #ifdef __cplusplus extern "C" { #endif -/* module flags */ - -#define B_KEEP_LOADED 0x00000001 - - -/* module info structure */ - -typedef struct module_info module_info; - -struct module_info { - const char *name; - uint32 flags; - status_t (*std_ops)(int32, ...); -}; - -#define B_MODULE_INIT 1 -#define B_MODULE_UNINIT 2 - -_IMPEXP_KERNEL status_t get_module(const char *path, module_info **vec); -_IMPEXP_KERNEL status_t put_module(const char *path); - -_IMPEXP_KERNEL status_t get_next_loaded_module_name(uint32 *cookie, char *buf, size_t *bufsize); -_IMPEXP_KERNEL void * open_module_list(const char *prefix); -_IMPEXP_KERNEL status_t read_next_module_name(void *cookie, char *buf, size_t *bufsize); -_IMPEXP_KERNEL status_t close_module_list(void *cookie); +extern status_t get_module(const char *path, module_info **_info); +extern status_t put_module(const char *path); +extern status_t get_next_loaded_module_name(uint32 *cookie, char *buffer, size_t *_bufferSize); +extern void *open_module_list(const char *prefix); +extern status_t close_module_list(void *cookie); +extern status_t read_next_module_name(void *cookie, char *buffer, size_t *_bufferSize); #ifdef __cplusplus } #endif -#endif +#endif /* _MODULE_H */