Skip to content

Fix non-portable defines #4775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion platform/mbed_application.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@

#include<stdint.h>

#define MBED_APPLICATION_SUPPORT defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)
#if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)
#define MBED_APPLICATION_SUPPORT 1
#else
#define MBED_APPLICATION_SUPPORT 0
#endif

#if MBED_APPLICATION_SUPPORT
#ifdef __cplusplus
extern "C" {
Expand Down
6 changes: 5 additions & 1 deletion platform/mbed_critical.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
#include "platform/mbed_assert.h"
#include "platform/mbed_toolchain.h"

#define EXCLUSIVE_ACCESS (!defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS))
#if !defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS)
#define EXCLUSIVE_ACCESS 1
#else
#define EXCLUSIVE_ACCESS 0
#endif

static volatile uint32_t interrupt_enable_counter = 0;
static volatile bool critical_interrupts_disabled = false;
Expand Down