This commit is contained in:
rusefi 2017-06-07 21:28:15 -04:00
parent 4a92c999b0
commit cb20b8e20a
1 changed files with 6 additions and 2 deletions

View File

@ -287,7 +287,7 @@ bool lockAnyContext(void) {
return true;
#if USE_PORT_LOCK
port_lock();
#else
#else /* #if USE_PORT_LOCK */
if (isIsrContext()) {
chSysLockFromISR()
;
@ -295,11 +295,14 @@ bool lockAnyContext(void) {
chSysLock()
;
}
#endif
#endif /* #if USE_PORT_LOCK */
return false;
}
void unlockAnyContext(void) {
#if USE_PORT_LOCK
port_unlock();
#else /* #if USE_PORT_LOCK */
if (isIsrContext()) {
chSysUnlockFromISR()
;
@ -307,4 +310,5 @@ void unlockAnyContext(void) {
chSysUnlock()
;
}
#endif /* #if USE_PORT_LOCK */
}