1
0
Fork 0
forked from len0rd/rockbox

loader-initialized global plugin API:

struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by
__header.api

the loader uses this pointer to initialize rb before calling entry_point

entry_point is no longer passed a pointer to the plugin API

all plugins, and pluginlib functions, are modified to refer to the
global rb

pluginlib functions which only served to copy the API pointer are
removed

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andrew Mahone 2009-01-16 10:34:40 +00:00
parent 35677cbc54
commit 23d9812273
179 changed files with 586 additions and 1183 deletions

View file

@ -46,7 +46,7 @@
The linker script for the overlay should use a base address towards the
end of the audiobuffer, just low enough to make the overlay fit. */
enum plugin_status run_overlay(const struct plugin_api* rb, const void* parameter,
enum plugin_status run_overlay(const void* parameter,
unsigned char *filename, unsigned char *name)
{
int fd, readsize;
@ -107,6 +107,7 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete
rb->memset(header.load_addr + readsize, 0,
header.end_addr - (header.load_addr + readsize));
return header.entry_point(rb, parameter);
*(header.api) = rb;
return header.entry_point(parameter);
}
#endif