chThdCreateStatic hangs
Posted: Wed Jul 27, 2016 1:17 am
Hi,
In testing LwIP, had an issue with chThdCreateStatic hanging, if CH_CFG_NO_IDLE_THREAD = TRUE.
In the lwip_bindings/lwipthread.c lwipInit code:
/* Creating the lwIP thread (it changes priority internally).*/
chThdCreateStatic(wa_lwip_thread, sizeof (wa_lwip_thread),
chThdGetPriorityX() - 1, lwip_thread, (void *)opts);
this causes chSchReadyI to hang since it can't insert the thread (line 231).
Easy enough to work around, by creating an IDLE thread, or by changing priority of the lwip thread, but maybe some other checks/protection should also be provided in the OS?
Thanks,
Al
In testing LwIP, had an issue with chThdCreateStatic hanging, if CH_CFG_NO_IDLE_THREAD = TRUE.
In the lwip_bindings/lwipthread.c lwipInit code:
/* Creating the lwIP thread (it changes priority internally).*/
chThdCreateStatic(wa_lwip_thread, sizeof (wa_lwip_thread),
chThdGetPriorityX() - 1, lwip_thread, (void *)opts);
this causes chSchReadyI to hang since it can't insert the thread (line 231).
Easy enough to work around, by creating an IDLE thread, or by changing priority of the lwip thread, but maybe some other checks/protection should also be provided in the OS?
Thanks,
Al