diff options
author | William Wilgus <me.theuser@yahoo.com> | 2019-07-28 07:26:20 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2019-07-28 07:29:10 -0500 |
commit | ddf612c84b558bc3343d413c04cdddf59b23a2ed (patch) | |
tree | fd685cd5bcf2a370a2d4823d58f046ccec8d4797 /apps/plugins/lua/rocklib.c | |
parent | fd20114eb2b2148d368f954a38bbf72748956216 (diff) | |
download | rockbox-ddf612c84b558bc3343d413c04cdddf59b23a2ed.tar.gz rockbox-ddf612c84b558bc3343d413c04cdddf59b23a2ed.zip |
lua remove unneeded plugin functions
Change-Id: I04bc38d03b7f0ca65a815685eb6ab0f5ff825c45
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r-- | apps/plugins/lua/rocklib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index b37f5245dc..d1ef3adaaf 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c | |||
@@ -77,6 +77,15 @@ RB_WRAP(schedule_cpu_boost) | |||
77 | } | 77 | } |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | RB_WRAP(thread_set_priority) | ||
81 | { | ||
82 | unsigned int thread_id = rb->thread_self(); | ||
83 | int priority = (int) luaL_checkint(L, 1); | ||
84 | int result = rb->thread_set_priority(thread_id, priority); | ||
85 | lua_pushinteger(L, result); | ||
86 | return 1; | ||
87 | } | ||
88 | |||
80 | RB_WRAP(current_path) | 89 | RB_WRAP(current_path) |
81 | { | 90 | { |
82 | return get_current_path(L, 1); | 91 | return get_current_path(L, 1); |
@@ -769,6 +778,7 @@ static const luaL_Reg rocklib[] = | |||
769 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | 778 | #ifdef HAVE_SCHEDULER_BOOSTCTRL |
770 | RB_FUNC(schedule_cpu_boost), | 779 | RB_FUNC(schedule_cpu_boost), |
771 | #endif | 780 | #endif |
781 | RB_FUNC(thread_set_priority), | ||
772 | 782 | ||
773 | RB_FUNC(current_path), | 783 | RB_FUNC(current_path), |
774 | 784 | ||
@@ -846,7 +856,7 @@ LUALIB_API int luaopen_rock(lua_State *L) | |||
846 | lua_pushstring(L, "rb_defines"); | 856 | lua_pushstring(L, "rb_defines"); |
847 | if (lua_pcall (L, 1, 0, 0)) | 857 | if (lua_pcall (L, 1, 0, 0)) |
848 | lua_pop(L, 1); | 858 | lua_pop(L, 1); |
849 | #if 0 | 859 | #if 0 /* see rb_defines.lua */ |
850 | static const struct lua_int_reg rlib_const_int[] = | 860 | static const struct lua_int_reg rlib_const_int[] = |
851 | { | 861 | { |
852 | /* useful integer constants */ | 862 | /* useful integer constants */ |