]> granicus.if.org Git - esp-idf/commitdiff
crosscore_int: use _ISR version of portENTER/EXIT_CRITICAL in ISR
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 29 Jan 2018 13:40:38 +0000 (21:40 +0800)
committerMahavir Jain <mahavir@espressif.com>
Thu, 19 Apr 2018 12:58:55 +0000 (18:28 +0530)
components/esp32/crosscore_int.c

index 4a57a2b197a2b4f2c6a455b6440d7fddef287f9e..9ccda1f8249c3bd21142ce68d073a6f02ef82fef 100644 (file)
@@ -61,10 +61,10 @@ static void IRAM_ATTR esp_crosscore_isr(void *arg) {
         DPORT_WRITE_PERI_REG(DPORT_CPU_INTR_FROM_CPU_1_REG, 0);
     }
     //Grab the reason and clear it.
-    portENTER_CRITICAL(&reason_spinlock);
+    portENTER_CRITICAL_ISR(&reason_spinlock);
     my_reason_val=*my_reason;
     *my_reason=0;
-    portEXIT_CRITICAL(&reason_spinlock);
+    portEXIT_CRITICAL_ISR(&reason_spinlock);
 
     //Check what we need to do.
     if (my_reason_val & REASON_YIELD) {