summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2019-07-28 14:56:59 -0400
committerFranklin Wei <franklin@rockbox.org>2019-07-29 00:50:11 +0200
commit8379b230f66d5ef0ac3e7282431d1f40fc90f22c (patch)
treee506b9959d9d03a952e5c4e0ea8d2e16d62fe3ce
parent55729048876a63cbb6d264e074cbd754e4125080 (diff)
downloadrockbox-8379b230f66d5ef0ac3e7282431d1f40fc90f22c.tar.gz
rockbox-8379b230f66d5ef0ac3e7282431d1f40fc90f22c.zip
lua: wrap thread_set_priority with #ifdef HAVE_PRIORITY_SCHEDULING
Should fix a compile-time error on simulator. Change-Id: I5962479579350ebffe6dcce4f65a629b108ff936
-rw-r--r--apps/plugins/lua/rocklib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index c266516602..1e3bc207b7 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -77,6 +77,7 @@ RB_WRAP(schedule_cpu_boost)
77} 77}
78#endif 78#endif
79 79
80#ifdef HAVE_PRIORITY_SCHEDULING
80RB_WRAP(thread_set_priority) 81RB_WRAP(thread_set_priority)
81{ 82{
82 unsigned int thread_id = rb->thread_self(); 83 unsigned int thread_id = rb->thread_self();
@@ -85,6 +86,7 @@ RB_WRAP(thread_set_priority)
85 lua_pushinteger(L, result); 86 lua_pushinteger(L, result);
86 return 1; 87 return 1;
87} 88}
89#endif
88 90
89RB_WRAP(current_path) 91RB_WRAP(current_path)
90{ 92{
@@ -778,7 +780,10 @@ static const luaL_Reg rocklib[] =
778#ifdef HAVE_SCHEDULER_BOOSTCTRL 780#ifdef HAVE_SCHEDULER_BOOSTCTRL
779 RB_FUNC(schedule_cpu_boost), 781 RB_FUNC(schedule_cpu_boost),
780#endif 782#endif
783
784#ifdef HAVE_PRIORITY_SCHEDULING
781 RB_FUNC(thread_set_priority), 785 RB_FUNC(thread_set_priority),
786#endif
782 787
783 RB_FUNC(current_path), 788 RB_FUNC(current_path),
784 789