summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-12-11 07:55:02 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-03-24 08:32:17 -0400
commitba7d2705d6ee53b8bb897800fa7dbad01b48602a (patch)
treea67acd424c91454e4ee6e1adcd1e47d276600a70
parentde2754be3a2658363828eeb3a83579ad3bad0f99 (diff)
lib: Convert THREAD_YIELD_TIME_SLOT to EVENT_YIELD_TIME_SLOT
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--lib/event.c2
-rw-r--r--lib/event.h2
-rw-r--r--lib/workqueue.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/event.c b/lib/event.c
index 982e1593a1..5aea78186c 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -810,7 +810,7 @@ static struct event *thread_get(struct thread_master *m, uint8_t type,
thread->add_type = type;
thread->master = m;
thread->arg = arg;
- thread->yield = THREAD_YIELD_TIME_SLOT; /* default */
+ thread->yield = EVENT_YIELD_TIME_SLOT; /* default */
thread->ref = NULL;
thread->ignore_timer_late = false;
diff --git a/lib/event.h b/lib/event.h
index 1cc7905ed9..c38b7b6c32 100644
--- a/lib/event.h
+++ b/lib/event.h
@@ -148,7 +148,7 @@ struct cpu_thread_history {
#define TIMER_SECOND_MICRO 1000000L
/* Thread yield time. */
-#define THREAD_YIELD_TIME_SLOT 10 * 1000L /* 10ms */
+#define EVENT_YIELD_TIME_SLOT 10 * 1000L /* 10ms */
#define THREAD_TIMER_STRLEN 12
diff --git a/lib/workqueue.c b/lib/workqueue.c
index 4a8084bbc6..b63dafd7e9 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -78,7 +78,7 @@ struct work_queue *work_queue_new(struct thread_master *m,
/* Default values, can be overridden by caller */
new->spec.hold = WORK_QUEUE_DEFAULT_HOLD;
- new->spec.yield = THREAD_YIELD_TIME_SLOT;
+ new->spec.yield = EVENT_YIELD_TIME_SLOT;
new->spec.retry = WORK_QUEUE_DEFAULT_RETRY;
return new;
@@ -127,7 +127,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 != THREAD_YIELD_TIME_SLOT)
+ wq->spec.yield != EVENT_YIELD_TIME_SLOT)
thread_set_yield_time(wq->thread, wq->spec.yield);
return 1;
} else