|
@@ -92,13 +92,13 @@ uint32_t systick (ANY_MODE) {
|
|
|
|
|
|
// SYSTICK interrupt service routine
|
|
|
|
|
|
-void systickInterruptServiceRoutine (SECTION_MODE) {
|
|
|
+void systickInterruptServiceRoutine (IRQ_MODE) {
|
|
|
const uint32_t newUptime = gUptime + 1 ;
|
|
|
gUptime = newUptime ;
|
|
|
// Run real.time.interrupt.routine.array section routines
|
|
|
- extern void (* __real_time_interrupt_routine_array_start) (SECTION_MODE_ const uint32_t inUptime) ;
|
|
|
- extern void (* __real_time_interrupt_routine_array_end) (SECTION_MODE_ const uint32_t inUptime) ;
|
|
|
- void (* * ptr) (SECTION_MODE_ const uint32_t) = & __real_time_interrupt_routine_array_start ;
|
|
|
+ extern void (* __real_time_interrupt_routine_array_start) (IRQ_MODE_ const uint32_t inUptime) ;
|
|
|
+ extern void (* __real_time_interrupt_routine_array_end) (IRQ_MODE_ const uint32_t inUptime) ;
|
|
|
+ void (* * ptr) (IRQ_MODE_ const uint32_t) = & __real_time_interrupt_routine_array_start ;
|
|
|
while (ptr != & __real_time_interrupt_routine_array_end) {
|
|
|
(* ptr) (MODE_ newUptime) ;
|
|
|
ptr ++ ;
|
|
@@ -107,13 +107,15 @@ void systickInterruptServiceRoutine (SECTION_MODE) {
|
|
|
|
|
|
// busyWaitDuring, busyWaitUntil — USER MODE
|
|
|
|
|
|
-void busyWaitDuring (USER_MODE_ const uint32_t inDelayMS) {
|
|
|
- busyWaitUntil (MODE_ gUptime + inDelayMS) ;
|
|
|
+void waitDuring (USER_MODE_ const uint32_t inDelayMS) {
|
|
|
+ waitUntil (MODE_ gUptime + inDelayMS) ;
|
|
|
}
|
|
|
|
|
|
|
|
|
-void busyWaitUntil (USER_MODE_ const uint32_t inDeadlineMS) {
|
|
|
- while (inDeadlineMS > gUptime) {}
|
|
|
+void service_waitUntil (KERNEL_MODE_ const uint32_t inDeadlineMS) {
|
|
|
+ if (inDeadlineMS > gUptime) {
|
|
|
+ kernel_blockOnDeadline(MODE_ inDeadlineMS);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|