Christopher Haster / events

Dependents:   SimpleHTTPExample

Revision:
7:dcd589b578ca
Parent:
6:31c141d3bcc7
Child:
9:2b0910397844
--- a/EventQueue.cpp	Wed Apr 20 23:07:47 2016 -0500
+++ b/EventQueue.cpp	Thu Apr 21 04:36:39 2016 -0500
@@ -77,9 +77,7 @@
     event->next = *p;
     *p = event;
 
-    if (!primask) {
-        __enable_irq();
-    }
+    __set_PRIMASK(primask);
 }
 
 void EventQueue::event_unregister(struct event *event) {
@@ -93,8 +91,6 @@
         }
     }
 
-    if (!primask) {
-        __enable_irq();
-    }
+    __set_PRIMASK(primask);
 }