28#ifndef __KOS_LIBRARY_H
29#define __KOS_LIBRARY_H
47TAILQ_HEAD(klqueue, klibrary);
71typedef struct klibrary {
109 const char *(*lib_get_name)(void);
131 int (*lib_open)(
struct klibrary *lib);
141 int (*lib_close)(
struct klibrary *lib);
145#define LIBRARY_DEFAULTS 0
149extern struct kllist library_list;
286void library_init(
void);
289void library_shutdown(
void);
Various common macros used throughout the codebase.
ELF binary loading support.
Virtual filesystem support.
static uint32_t("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_UINTENSITY(uint8_t x)
Definition purupuru.h:96
const char * library_get_name(klibrary_t *lib)
Retrieve the specified library's name.
klibrary_t * library_open(const char *name, const char *fn)
Try to open a library by name.
int libid_t
Library ID type.
Definition library.h:51
libid_t library_get_libid(klibrary_t *lib)
Retrieve the specified library's runtime-assigned ID.
int library_close(klibrary_t *lib)
Close a previously opened library.
klibrary_t * library_lookup_fn(const char *fn)
Look up a library by filename.
uint32_t library_get_version(klibrary_t *lib)
Retrieve the specified library's version.
klibrary_t * library_lookup(const char *name)
Look up a library by name.
klibrary_t * library_by_libid(libid_t libid)
Look up a library by ID.
int library_destroy(klibrary_t *lib)
Destroy a library.
klibrary_t * library_create(int flags)
Create a new library shell.
int library_get_refcnt(klibrary_t *lib)
Retrieve the specified library's reference count.
typedef LIST_HEAD(nmmgr_list, nmmgr_handler) nmmgr_list_t
Name handler list type.
Kernel-specific definition of a loaded ELF binary.
Definition elf.h:353
Loaded library structure.
Definition library.h:71
elf_prog_t image
ELF image for this library.
Definition library.h:88
libid_t libid
Library ID (assigned at runtime).
Definition library.h:79
uint32_t flags
Library flags.
Definition library.h:82
int refcnt
Library reference count.
Definition library.h:96
LIST_ENTRY(klibrary) list
Library list handle.