kernel: timeslicing: add time slice reset in slice per thread api

This will reset time slice in k_thread_time_slice_set()
when slice per thread api is used.

Currently it will reset it only in standard slice_set

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
This commit is contained in:
Adrian Bonislawski 2024-04-24 10:56:24 +02:00 committed by Fabio Baltieri
parent 1964d1fab5
commit e44d2e65ee
1 changed files with 1 additions and 0 deletions

View File

@ -95,6 +95,7 @@ void k_thread_time_slice_set(struct k_thread *thread, int32_t thread_slice_ticks
thread->base.slice_ticks = thread_slice_ticks;
thread->base.slice_expired = expired;
thread->base.slice_data = data;
z_reset_time_slice(thread);
}
}
#endif