mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #6162 from maciejbocianski/sleep_manager_racecondition_test_fix
sleep_manager_racecondition test fix for devices with low CPU clockpull/6182/head
commit
55f710f431
|
@ -67,12 +67,12 @@ void sleep_manager_irq_test()
|
||||||
Ticker ticker1;
|
Ticker ticker1;
|
||||||
Timer timer;
|
Timer timer;
|
||||||
|
|
||||||
ticker1.attach_us(&sleep_manager_locking_irq_test, 500);
|
ticker1.attach_us(&sleep_manager_locking_irq_test, 1000);
|
||||||
|
|
||||||
// run this for 5 seconds
|
// run this for 10 seconds
|
||||||
timer.start();
|
timer.start();
|
||||||
int start = timer.read();
|
int start = timer.read();
|
||||||
int end = start + 5;
|
int end = start + 10;
|
||||||
while (timer.read() < end) {
|
while (timer.read() < end) {
|
||||||
sleep_manager_locking_irq_test();
|
sleep_manager_locking_irq_test();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue