lib: Convert THREAD_YIELD_TIME_SLOT to EVENT_YIELD_TIME_SLOT

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2022-12-11 07:55:02 -05:00
parent de2754be3a
commit ba7d2705d6
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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

View File

@ -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