diff options
| author | Franklin Wei <franklin@rockbox.org> | 2019-07-28 14:56:59 -0400 |
|---|---|---|
| committer | Franklin Wei <franklin@rockbox.org> | 2019-07-28 14:56:59 -0400 |
| commit | fd6ddf8735b527eced4954cea99ac06f32185752 (patch) | |
| tree | 25e4ba73504907bea968b11c06c4478fb708632e /apps/plugins/lua | |
| parent | d8330c9c18ac227800ed7dc9c6ae72946e92e4fb (diff) | |
| download | rockbox-fd6ddf8735b527eced4954cea99ac06f32185752.zip rockbox-fd6ddf8735b527eced4954cea99ac06f32185752.tar.gz rockbox-fd6ddf8735b527eced4954cea99ac06f32185752.tar.bz2 rockbox-fd6ddf8735b527eced4954cea99ac06f32185752.tar.xz | |
lua: wrap thread_set_priority with #ifdef HAVE_PRIORITY_SCHEDULING
Should fix a compile-time error on simulator.
Change-Id: I5962479579350ebffe6dcce4f65a629b108ff936
Diffstat (limited to 'apps/plugins/lua')
| -rw-r--r-- | apps/plugins/lua/rocklib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index c266516..1e3bc20 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -77,6 +77,7 @@ RB_WRAP(schedule_cpu_boost) } #endif +#ifdef HAVE_PRIORITY_SCHEDULING RB_WRAP(thread_set_priority) { unsigned int thread_id = rb->thread_self(); @@ -85,6 +86,7 @@ RB_WRAP(thread_set_priority) lua_pushinteger(L, result); return 1; } +#endif RB_WRAP(current_path) { @@ -778,7 +780,10 @@ static const luaL_Reg rocklib[] = #ifdef HAVE_SCHEDULER_BOOSTCTRL RB_FUNC(schedule_cpu_boost), #endif + +#ifdef HAVE_PRIORITY_SCHEDULING RB_FUNC(thread_set_priority), +#endif RB_FUNC(current_path), |