llext: make buffer access functions accessible externally
llext_seek(), llext_read() and llext_peek() are needed outside of the extension code too, move them to a header. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
b0b4b0baa0
commit
a2a62b46a3
2 changed files with 19 additions and 19 deletions
|
@ -21,25 +21,6 @@ K_HEAP_DEFINE(llext_heap, CONFIG_LLEXT_HEAP_SIZE * 1024);
|
|||
|
||||
static const char ELF_MAGIC[] = {0x7f, 'E', 'L', 'F'};
|
||||
|
||||
static inline int llext_read(struct llext_loader *l, void *buf, size_t len)
|
||||
{
|
||||
return l->read(l, buf, len);
|
||||
}
|
||||
|
||||
static inline int llext_seek(struct llext_loader *l, size_t pos)
|
||||
{
|
||||
return l->seek(l, pos);
|
||||
}
|
||||
|
||||
static inline void *llext_peek(struct llext_loader *l, size_t pos)
|
||||
{
|
||||
if (l->peek) {
|
||||
return l->peek(l, pos);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static sys_slist_t _llext_list = SYS_SLIST_STATIC_INIT(&_llext_list);
|
||||
|
||||
sys_slist_t *llext_list(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue