Skip to content

Commit

Permalink
kernel: timeslicing: add time slice reset in slice per thread api
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
abonislawski committed Apr 24, 2024
1 parent 2ccf775 commit 94b6441
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/timeslicing.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94b6441

Please sign in to comment.