summaryrefslogtreecommitdiff
path: root/lib/workqueue.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-12-11 10:39:12 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-03-24 08:32:17 -0400
commit70c35c11f2af5f169db446ef02ac0dda7b2822fc (patch)
tree225495229380773b17c58f088e230cebf43b1b29 /lib/workqueue.c
parent4f830a0799e74bd18af18e3ded5d6e16c79a7d56 (diff)
*: Convert thread_should_yield and thread_set_yield_time
Convert thread_should_yield and thread_set_yield_time to event_should_yield and event_set_yield_time Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/workqueue.c')
-rw-r--r--lib/workqueue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c
index b63dafd7e9..7660663449 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -128,7 +128,7 @@ static int work_queue_schedule(struct work_queue *wq, unsigned int delay)
/* set thread yield time, if needed */
if (thread_is_scheduled(wq->thread) &&
wq->spec.yield != EVENT_YIELD_TIME_SLOT)
- thread_set_yield_time(wq->thread, wq->spec.yield);
+ event_set_yield_time(wq->thread, wq->spec.yield);
return 1;
} else
return 0;
@@ -311,8 +311,8 @@ void work_queue_run(struct event *thread)
cycles++;
/* test if we should yield */
- if (!(cycles % wq->cycles.granularity)
- && thread_should_yield(thread)) {
+ if (!(cycles % wq->cycles.granularity) &&
+ event_should_yield(thread)) {
yielded = 1;
goto stats;
}