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.zip rockbox-ddf612c84b558bc3343d413c04cdddf59b23a2ed.tar.gz rockbox-ddf612c84b558bc3343d413c04cdddf59b23a2ed.tar.bz2 rockbox-ddf612c84b558bc3343d413c04cdddf59b23a2ed.tar.xz | |
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 b37f524..d1ef3ad 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -77,6 +77,15 @@ RB_WRAP(schedule_cpu_boost) } #endif +RB_WRAP(thread_set_priority) +{ + unsigned int thread_id = rb->thread_self(); + int priority = (int) luaL_checkint(L, 1); + int result = rb->thread_set_priority(thread_id, priority); + lua_pushinteger(L, result); + return 1; +} + RB_WRAP(current_path) { return get_current_path(L, 1); @@ -769,6 +778,7 @@ static const luaL_Reg rocklib[] = #ifdef HAVE_SCHEDULER_BOOSTCTRL RB_FUNC(schedule_cpu_boost), #endif + RB_FUNC(thread_set_priority), RB_FUNC(current_path), @@ -846,7 +856,7 @@ LUALIB_API int luaopen_rock(lua_State *L) lua_pushstring(L, "rb_defines"); if (lua_pcall (L, 1, 0, 0)) lua_pop(L, 1); -#if 0 +#if 0 /* see rb_defines.lua */ static const struct lua_int_reg rlib_const_int[] = { /* useful integer constants */ |