26#ifndef __KOS_LIBRARY_H
27#define __KOS_LIBRARY_H
46TAILQ_HEAD(klqueue, klibrary);
71typedef struct klibrary {
109 const char * (*lib_get_name)(void);
132 int (*lib_open)(
struct klibrary * lib);
144 int (*lib_close)(
struct klibrary * lib);
148#define LIBRARY_DEFAULTS 0
152extern struct kllist library_list;
274int library_init(
void);
277void library_shutdown(
void);
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.
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(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.
uint32 library_get_version(klibrary_t *lib)
Retrieve the specified library's version.
tid_t libid_t
Library ID type.
Definition library.h:51
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.
unsigned long uint32
32-bit unsigned integer
Definition types.h:33
handle_t tid_t
Thread ID type.
Definition types.h:85
Kernel-specific definition of a loaded ELF binary.
Definition elf.h:304
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
int refcnt
Library reference count.
Definition library.h:96
uint32 flags
Library flags.
Definition library.h:82
LIST_ENTRY(klibrary) list
Library list handle.