Fix-Point commented on code in PR #16231: URL: https://github.com/apache/nuttx/pull/16231#discussion_r2049939572
########## sched/wqueue/kwork_thread.c: ########## @@ -110,6 +118,44 @@ struct lp_wqueue_s g_lpwork = * Private Functions ****************************************************************************/ +static inline void work_timer_expired(wdparm_t arg) +{ + FAR struct kwork_wqueue_s *wq = (FAR struct kwork_wqueue_s *)arg; + irqstate_t flags = spin_lock_irqsave(&wq->lock); + sched_lock(); + + if (wq->wait_count > 0) + { + wq->wait_count--; + nxsem_post(&wq->sem); + } + + spin_unlock_irqrestore(&wq->lock, flags); + sched_unlock(); +} + +static inline +void work_expiration(clock_t ticks, FAR struct kwork_wqueue_s *wq) +{ + struct work_s *work; + + while (!list_is_empty(&wq->wait_q)) Review Comment: Done. ########## sched/wqueue/kwork_thread.c: ########## @@ -181,7 +234,31 @@ static int work_thread(int argc, FAR char *argv[]) /* Mark the work as no longer being queued */ - work->worker = NULL; + if (work->period != 0) + { + /* Insert qtime */ + + work->qtime += work->period; + + if (clock_compare(work->qtime, ticks)) Review Comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org