Skip to content

Commit e44d2e6

Browse files
abonislawskifabiobaltieri
authored andcommitted
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 <[email protected]>
1 parent 1964d1f commit e44d2e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/timeslicing.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ void k_thread_time_slice_set(struct k_thread *thread, int32_t thread_slice_ticks
9595
thread->base.slice_ticks = thread_slice_ticks;
9696
thread->base.slice_expired = expired;
9797
thread->base.slice_data = data;
98+
z_reset_time_slice(thread);
9899
}
99100
}
100101
#endif

0 commit comments

Comments
 (0)