Skip to content
This repository was archived by the owner on Aug 19, 2021. It is now read-only.

Commit 021d7c0

Browse files
authored
Merge pull request #12 from ARMmbed/fix-cortex-a
Fixed compilation error on Cortex A platforms
2 parents c55658f + 1657868 commit 021d7c0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

events-c/events_mbed.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,11 @@ int events_mutex_create(events_mutex_t *m) { return 0; }
5252
void events_mutex_destroy(events_mutex_t *m) { }
5353

5454
void events_mutex_lock(events_mutex_t *m) {
55-
*m = __get_PRIMASK();
56-
__disable_irq();
55+
core_util_critical_section_enter();
5756
}
5857

5958
void events_mutex_unlock(events_mutex_t *m) {
60-
__set_PRIMASK(*m);
59+
core_util_critical_section_exit();
6160
}
6261

6362

0 commit comments

Comments
 (0)