cleanup: replace magic TimeSlice::new(100) and Priority::new(16) with DEFAULT
TimeSlice::DEFAULT and Priority::DEFAULT already exist with the same values. Using them makes the intent clear and centralizes the default values. TimeSlice::new(2) in tick test is intentional — tests preemption after 2 ticks specifically.
This commit is contained in:
@@ -23,7 +23,7 @@ pub fn test_kernel() -> Kernel<MockPlatform> {
|
||||
pub fn kernel_with_process() -> (Kernel<MockPlatform>, ProcessId) {
|
||||
let mut kernel = test_kernel();
|
||||
let (pid, _tid) = kernel
|
||||
.boot(Priority::new(16).unwrap(), TimeSlice::new(100))
|
||||
.boot(Priority::DEFAULT, TimeSlice::DEFAULT)
|
||||
.unwrap();
|
||||
(kernel, pid)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user