mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-24 05:43:11 -05:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
|
@ -22,21 +22,21 @@
|
|||
#include "thread_wait.hpp"
|
||||
|
||||
int ThreadWait::sleep() {
|
||||
chSysLock();
|
||||
thread_to_wake = chThdSelf();
|
||||
chSchGoSleepS(THD_STATE_SUSPENDED);
|
||||
const auto result = chThdSelf()->p_u.rdymsg;
|
||||
chSysUnlock();
|
||||
return result;
|
||||
chSysLock();
|
||||
thread_to_wake = chThdSelf();
|
||||
chSchGoSleepS(THD_STATE_SUSPENDED);
|
||||
const auto result = chThdSelf()->p_u.rdymsg;
|
||||
chSysUnlock();
|
||||
return result;
|
||||
}
|
||||
|
||||
bool ThreadWait::wake_from_interrupt(const int value) {
|
||||
if( thread_to_wake ) {
|
||||
thread_to_wake->p_u.rdymsg = value;
|
||||
chSchReadyI(thread_to_wake);
|
||||
thread_to_wake = nullptr;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
if (thread_to_wake) {
|
||||
thread_to_wake->p_u.rdymsg = value;
|
||||
chSchReadyI(thread_to_wake);
|
||||
thread_to_wake = nullptr;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue