diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2022-01-21 09:01:42 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-21 09:01:42 -0600 |
| commit | cdaa204effe98908a2396b528fdfe0d8dfe4393c (patch) | |
| tree | 7943c9b7a689662f315823ea1fa912816994b823 /lib/workqueue.c | |
| parent | c63f4b0ffdd1fd4c08f6ccc15fa3144a6cd4d4ea (diff) | |
| parent | e8b3a2f74b707529c70908c6afc97a486588ef30 (diff) | |
Merge pull request #8011 from donaldsharp/starvation
lib: Figure out if we are being starved for cpu
Diffstat (limited to 'lib/workqueue.c')
| -rw-r--r-- | lib/workqueue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index 2a8326c056..86afe4082e 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -135,10 +135,11 @@ static int work_queue_schedule(struct work_queue *wq, unsigned int delay) /* Schedule timer if there's a delay, otherwise just schedule * as an 'event' */ - if (delay > 0) + if (delay > 0) { thread_add_timer_msec(wq->master, work_queue_run, wq, delay, &wq->thread); - else + thread_ignore_late_timer(wq->thread); + } else thread_add_event(wq->master, work_queue_run, wq, 0, &wq->thread); |
