summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugin.c4
-rw-r--r--apps/plugin.h15
2 files changed, 18 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index ff23a55537..a80e9dd86d 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -518,6 +518,10 @@ static const struct plugin_api rockbox_api = {
518#endif 518#endif
519 519
520 thread_wait, 520 thread_wait,
521
522#ifdef PROC_NEEDS_CACHEALIGN
523 align_buffer,
524#endif
521}; 525};
522 526
523int plugin_load(const char* plugin, void* parameter) 527int plugin_load(const char* plugin, void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index 300cad0781..f56590c29e 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -37,6 +37,7 @@
37#include "config.h" 37#include "config.h"
38#include "system.h" 38#include "system.h"
39#include "dir.h" 39#include "dir.h"
40#include "general.h"
40#include "kernel.h" 41#include "kernel.h"
41#include "thread.h" 42#include "thread.h"
42#include "button.h" 43#include "button.h"
@@ -112,7 +113,7 @@
112#define PLUGIN_MAGIC 0x526F634B /* RocK */ 113#define PLUGIN_MAGIC 0x526F634B /* RocK */
113 114
114/* increase this every time the api struct changes */ 115/* increase this every time the api struct changes */
115#define PLUGIN_API_VERSION 88 116#define PLUGIN_API_VERSION 89
116 117
117/* update this to latest version if a change to the api struct breaks 118/* update this to latest version if a change to the api struct breaks
118 backwards compatibility (and please take the opportunity to sort in any 119 backwards compatibility (and please take the opportunity to sort in any
@@ -640,6 +641,10 @@ struct plugin_api {
640#endif 641#endif
641 642
642 void (*thread_wait)(struct thread_entry *thread); 643 void (*thread_wait)(struct thread_entry *thread);
644
645#ifdef PROC_NEEDS_CACHEALIGN
646 size_t (*align_buffer)(void **start, size_t size, size_t align);
647#endif
643}; 648};
644 649
645/* plugin header */ 650/* plugin header */
@@ -742,4 +747,12 @@ enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter)
742 747
743#endif /* CACHE_FUNCTION_WRAPPERS */ 748#endif /* CACHE_FUNCTION_WRAPPERS */
744 749
750#ifndef ALIGN_BUFFER_WRAPPER
751#define ALIGN_BUFFER_WRAPPER(api) \
752 size_t align_buffer(void **start, size_t size, size_t align) \
753 { \
754 return (api)->align_buffer(start, size, align); \
755 }
756#endif /* ALIGN_BUFFER_WRAPPER */
757
745#endif 758#endif