Skip to content

Commit 1660bc6

Browse files
committed
run VEXos cpu1 scheduler while waiting for abort
This isn't necessarily fixing anything on the V5 in particular (exit requests are handled by CPU0, which then interrupt CPU1 after), but it's certainly more correct and may be required for other single-core VEXos targets if support is added in the future.
1 parent d11d208 commit 1660bc6

File tree

1 file changed

+7
-5
lines changed
  • library/std/src/sys/pal/vexos

1 file changed

+7
-5
lines changed

library/std/src/sys/pal/vexos/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,19 @@ pub fn abort_internal() -> ! {
106106
unsafe {
107107
// Force the serial buffer to flush
108108
while exit_time.elapsed() < FLUSH_TIMEOUT {
109+
vex_sdk::vexTasksRun();
110+
109111
// If the buffer has been fully flushed, exit the loop
110112
if vex_sdk::vexSerialWriteFree(stdio::STDIO_CHANNEL) == (stdio::STDOUT_BUF_SIZE as i32)
111113
{
112114
break;
113115
}
114-
vex_sdk::vexTasksRun();
115116
}
117+
116118
vex_sdk::vexSystemExitRequest();
117-
}
118-
119-
loop {
120-
crate::hint::spin_loop()
119+
120+
loop {
121+
vex_sdk::vexTasksRun();
122+
}
121123
}
122124
}

0 commit comments

Comments
 (0)