summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-25 10:28:35 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2022-03-25 18:16:11 -0400
commit8eb4689ab1c6fbe1af66293b33c92f4f8dd2cb6c (patch)
tree7b2f848f291612c705ec82cee9f35726b3de57c2 /apps/plugin.h
parent5d0f697e87da01f5fe66d2e76af77b9bcdc6bbbc (diff)
downloadrockbox-8eb4689ab1c6fbe1af66293b33c92f4f8dd2cb6c.tar.gz
rockbox-8eb4689ab1c6fbe1af66293b33c92f4f8dd2cb6c.zip
add way to lock portion of plugin buffer for TSR plugins
Some things in core that should probably be plugins steal the plugin buffer for their own use, TSR plugins have no way to detect or prevent this lock buffer reserves buffer_size bytes directly after the plugin itself returns the unreserved bytes still available from the plugin buffer Change-Id: I5a7849e209129b09400036a594569ef396b1b85f
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index de1077c9b4..2e0ace2e48 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -49,6 +49,7 @@
49 49
50char* strncpy(char *, const char *, size_t); 50char* strncpy(char *, const char *, size_t);
51void* plugin_get_buffer(size_t *buffer_size); 51void* plugin_get_buffer(size_t *buffer_size);
52size_t plugin_reserve_buffer(size_t buffer_size);
52int plugin_open(const char *plugin, const char *parameter); 53int plugin_open(const char *plugin, const char *parameter);
53 54
54#ifndef __PCTOOL__ 55#ifndef __PCTOOL__
@@ -935,6 +936,7 @@ struct plugin_api {
935 void (*onplay_show_playlist_menu)(const char* path, void (*playlist_insert_cb)); 936 void (*onplay_show_playlist_menu)(const char* path, void (*playlist_insert_cb));
936 void (*queue_remove_from_head)(struct event_queue *q, long id); 937 void (*queue_remove_from_head)(struct event_queue *q, long id);
937 int (*core_set_keyremap)(struct button_mapping* core_keymap, int count); 938 int (*core_set_keyremap)(struct button_mapping* core_keymap, int count);
939 size_t (*plugin_reserve_buffer)(size_t buffer_size);
938}; 940};
939 941
940/* plugin header */ 942/* plugin header */