25 #ifndef __KOS_LIBRARY_H
26 #define __KOS_LIBRARY_H
28 #include <sys/cdefs.h>
101 const char * (*lib_get_name)();
140 #define LIBRARY_DEFAULTS 0
144 extern struct kllist library_list;
269 void library_shutdown();
elf_prog_t image
ELF image for this library.
Definition: library.h:80
typedef LIST_HEAD(nmmgr_list, nmmgr_handler) nmmgr_list_t
Name handler list type.
LIST_ENTRY(klibrary) list
Library list handle.
int refcnt
Library reference count.
Definition: library.h:88
Loaded library structure.
Definition: library.h:63
Virtual filesystem support.
handle_t tid_t
Thread ID type.
Definition: types.h:80
const char * library_get_name(klibrary_t *lib)
Retrieve the specified library's name.
uint32 flags
Library flags.
Definition: library.h:74
libid_t libid
Library ID (assigned at runtime).
Definition: library.h:71
int library_close(klibrary_t *lib)
Close a previously opened library.
int(* lib_open)(struct klibrary *lib)
Open a library.
Definition: library.h:124
uint32(* lib_get_version)()
Retrieve the library's version.
Definition: library.h:111
ELF binary loading support.
klibrary_t * library_by_libid(libid_t libid)
Look up a library by ID.
int library_destroy(klibrary_t *lib)
Destroy a library.
unsigned long uint32
32-bit unsigned integer
Definition: types.h:28
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.
Kernel-specific definition of a loaded ELF binary.
Definition: elf.h:271
uint32 library_get_version(klibrary_t *lib)
Retrieve the specified library's version.
klibrary_t * library_create(int flags)
Create a new library shell.
int(* lib_close)(struct klibrary *lib)
Close an opened library.
Definition: library.h:136
tid_t libid_t
Library ID type.
Definition: library.h:43
struct klibrary klibrary_t
Loaded library structure.
klibrary_t * library_lookup(const char *name)
Look up a library by name.
int library_get_refcnt(klibrary_t *lib)
Retrieve the specified library's reference count.