mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
lua: wrap thread_set_priority with #ifdef HAVE_PRIORITY_SCHEDULING
Should fix a compile-time error on simulator. Change-Id: I5962479579350ebffe6dcce4f65a629b108ff936
This commit is contained in:
parent
5572904887
commit
8379b230f6
1 changed files with 5 additions and 0 deletions
|
@ -77,6 +77,7 @@ RB_WRAP(schedule_cpu_boost)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRIORITY_SCHEDULING
|
||||||
RB_WRAP(thread_set_priority)
|
RB_WRAP(thread_set_priority)
|
||||||
{
|
{
|
||||||
unsigned int thread_id = rb->thread_self();
|
unsigned int thread_id = rb->thread_self();
|
||||||
|
@ -85,6 +86,7 @@ RB_WRAP(thread_set_priority)
|
||||||
lua_pushinteger(L, result);
|
lua_pushinteger(L, result);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
RB_WRAP(current_path)
|
RB_WRAP(current_path)
|
||||||
{
|
{
|
||||||
|
@ -778,7 +780,10 @@ static const luaL_Reg rocklib[] =
|
||||||
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
||||||
RB_FUNC(schedule_cpu_boost),
|
RB_FUNC(schedule_cpu_boost),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRIORITY_SCHEDULING
|
||||||
RB_FUNC(thread_set_priority),
|
RB_FUNC(thread_set_priority),
|
||||||
|
#endif
|
||||||
|
|
||||||
RB_FUNC(current_path),
|
RB_FUNC(current_path),
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue