|
PatchworkOS
19e446b
A non-POSIX operating system.
|
#include <_libstd/MAX_PATH.h>#include <kernel/fs/file.h>#include <kernel/fs/path.h>#include <kernel/module/symbol.h>#include <kernel/utils/map.h>#include <kernel/utils/ref.h>#include <kernel/version.h>#include <kernel/acpi/devices.h>#include <stdint.h>#include <sys/fs.h>#include <sys/list.h>Go to the source code of this file.
Data Structures | |
| struct | module_info_t |
| struct | module_event_t |
| struct | module_device_t |
| struct | module_device_handler_t |
| struct | module_dependency_t |
| struct | module_t |
| struct | module_cached_symbol_t |
| Module symbol cache entry structure. More... | |
| struct | module_cached_device_entry_t |
| Module device cache entry structure. More... | |
| struct | module_cached_device_t |
| Module device cache entry structure. More... | |
Macros | |
| #define | MODULE_INFO_SECTION "._module_info" |
| #define | MODULE_INFO(_name, _author, _description, _version, _licence, _deviceTypes) |
| Macro to define module information. | |
| #define | MODULE_RESERVED_PREFIX "_mod" |
| Reserved prefix for module global symbols. | |
| #define | MODULE_DIR "/kernel/modules/" OS_VERSION "/:directory" |
| The directory where the kernel will look for modules. | |
Typedefs | |
| typedef struct module | module_t |
| typedef uint64_t(* | module_procedure_t) (const module_event_t *event) |
| Module procedure and entry point. | |
Enumerations | |
| enum | module_string_size_t { MODULE_MAX_NAME = 64 , MODULE_MAX_AUTHOR = 64 , MODULE_MAX_DESCRIPTION = 256 , MODULE_MAX_VERSION = 32 , MODULE_MAX_LICENSE = 64 , MODULE_MIN_INFO = 6 , MODULE_MAX_INFO = 1024 , MODULE_MAX_DEVICE_STRING = 32 } |
| Sizes for module strings. More... | |
| enum | module_reserved_prefix_length_t { MODULE_RESERVED_PREFIX_LENGTH = 4 } |
Length of MODULE_RESERVED_PREFIX. More... | |
| enum | module_event_type_t { MODULE_EVENT_NONE = 0 , MODULE_EVENT_LOAD , MODULE_EVENT_UNLOAD , MODULE_EVENT_DEVICE_ATTACH , MODULE_EVENT_DEVICE_DETACH } |
| Module event types. More... | |
| enum | module_flags_t { MODULE_FLAG_NONE = 0 , MODULE_FLAG_LOADED = 1 << 0 , MODULE_FLAG_GC_REACHABLE = 1 << 1 , MODULE_FLAG_GC_PINNED } |
| Module flags. More... | |
| enum | module_load_flags_t { MODULE_LOAD_ONE = 0 << 0 , MODULE_LOAD_ALL = 1 << 0 } |
| Module load flags. More... | |
Functions | |
| void | module_init_fake_kernel_module () |
| Initialize a fake module representing the kernel itself. | |
| uint64_t | module_device_attach (const char *type, const char *name, module_load_flags_t flags) |
| Notify the module system of a device being attached. | |
| void | module_device_detach (const char *name) |
| Notify the module system of a device being detached. | |
| bool | module_device_types_contains (const char *deviceTypes, const char *type) |
| Check if a list of device types contains a specific device type. | |