commit | 1c3051459bfc16d42dc659eaf026953ca9989b86 | [log] [tgz] |
---|---|---|
author | Andy Ross <andrew.j.ross@intel.com> | Mon Oct 15 11:10:49 2018 -0700 |
committer | Anas Nashif <anas.nashif@intel.com> | Tue Nov 13 17:10:07 2018 -0500 |
tree | f0386a8f1cf8a350e7e6391ad593688bcd7f8f90 | |
parent | 002a9f4cb7143c6fed86c5cfe6becf7c8659fea3 [diff] |
kernel/sched: Fix race in k_sched_time_slice_set() If this function is itself interrupted by a timeslice event, the slicing state can be corrupted. Just re-use the scheduler lock instead of using a new spinlock; this is a low-latency function that won't deadlock. Found by inspection. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>