28#ifndef __KOS_LIBRARY_H
29#define __KOS_LIBRARY_H
71typedef struct klibrary {
109 const char *(*lib_get_name)(void);
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.
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.
typedef TAILQ_HEAD(http_state_list, http_state)
Definition httpd.c:24
int lib_open(klibrary_t *lib)
Definition library-dependence.c:37
int lib_close(klibrary_t *lib)
Definition library-dependence.c:42
uint32_t lib_get_version()
Definition library-dependence.c:33
static pvr_list_t list
Definition shadow.c:25
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.