porting/npl/nuttx: fix callout_handler implement
callout_thread is working for all timeout callout, it need
an endless loop to catch all message.
@@ -44,6 +44,7 @@ callout_handler(pthread_addr_t arg)
{
struct ble_npl_callout *c;
+ while (true) {
pthread_mutex_lock(&callout_mutex);
while (!pending_callout) {
pthread_cond_wait(&callout_cond, &callout_mutex);
@@ -60,6 +61,7 @@ callout_handler(pthread_addr_t arg)
} else {
c->c_ev.ev_cb(&c->c_ev);
}
+ }
return NULL;
}
