Skip to content
Snippets Groups Projects
Commit 8d533da0 authored by Emilio Corigliano's avatar Emilio Corigliano
Browse files

[USART] Add check for rescheduling in `IRQhandleInterrupt`

parent d82d4d7c
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "arch/common/drivers/serial.h" #include "arch/common/drivers/serial.h"
#include "filesystem/file_access.h" #include "filesystem/file_access.h"
#include "kernel/scheduler/scheduler.h"
#include "miosix.h" #include "miosix.h"
///< Pointer to serial port classes to let interrupts access the classes ///< Pointer to serial port classes to let interrupts access the classes
...@@ -368,6 +369,11 @@ void USART::IRQhandleInterrupt() ...@@ -368,6 +369,11 @@ void USART::IRQhandleInterrupt()
if (rxWaiting) if (rxWaiting)
{ {
rxWaiting->IRQwakeup(); rxWaiting->IRQwakeup();
if (rxWaiting->IRQgetPriority() >
miosix::Thread::IRQgetCurrentThread()->IRQgetPriority())
{
miosix::Scheduler::IRQfindNextThread();
}
rxWaiting = nullptr; rxWaiting = nullptr;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment