Fix deadlock issue on linux target
The keyboard thread was causing a deadlock with the ui thread, now the keyboard thread is non-blocking.
This commit is contained in:
parent
cb4b55d9a3
commit
827bc45794
|
|
@ -59,6 +59,6 @@ int main(void)
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
// No low-frequency function at the moment
|
// No low-frequency function at the moment
|
||||||
OSTaskSuspend(NULL, &os_err);
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ static void kbd_task(void *arg)
|
||||||
long_press = false;
|
long_press = false;
|
||||||
send_event = false;
|
send_event = false;
|
||||||
// Lock display mutex and read keyboard status
|
// Lock display mutex and read keyboard status
|
||||||
OSMutexPend(&display_mutex, 0u, OS_OPT_PEND_BLOCKING, 0u, &os_err);
|
OSMutexPend(&display_mutex, 0u, OS_OPT_PEND_NON_BLOCKING, 0u, &os_err);
|
||||||
keys = kbd_getKeys();
|
keys = kbd_getKeys();
|
||||||
OSMutexPost(&display_mutex, OS_OPT_POST_NONE, &os_err);
|
OSMutexPost(&display_mutex, OS_OPT_POST_NONE, &os_err);
|
||||||
now = OSTimeGet(&os_err);
|
now = OSTimeGet(&os_err);
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------- TASK MANAGEMENT -------------------------- */
|
/* -------------------------- TASK MANAGEMENT -------------------------- */
|
||||||
#define OS_CFG_STAT_TASK_EN 1u /* Enable (1) or Disable (0) the statistics task */
|
#define OS_CFG_STAT_TASK_EN 0u /* Enable (1) or Disable (0) the statistics task */
|
||||||
#define OS_CFG_STAT_TASK_STK_CHK_EN 1u /* Check task stacks from the statistic task */
|
#define OS_CFG_STAT_TASK_STK_CHK_EN 1u /* Check task stacks from the statistic task */
|
||||||
|
|
||||||
#define OS_CFG_TASK_CHANGE_PRIO_EN 1u /* Include code for OSTaskChangePrio() */
|
#define OS_CFG_TASK_CHANGE_PRIO_EN 1u /* Include code for OSTaskChangePrio() */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue