Fixed compile errors for other Pi builds.

This commit is contained in:
Stephen White 2018-12-30 14:15:10 +11:00
parent 4dc0fd4b4f
commit 2979c69791
1 changed files with 5 additions and 3 deletions

View File

@ -18,8 +18,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
// //
#include "SpinLock.h" #include "SpinLock.h"
#include "defs.h"
//#ifdef HAS_MULTICORE
bool SpinLock::s_bEnabled = true; bool SpinLock::s_bEnabled = true;
@ -34,6 +33,7 @@ SpinLock::~SpinLock(void)
void SpinLock::Acquire(void) void SpinLock::Acquire(void)
{ {
#ifdef HAS_MULTICORE
if (s_bEnabled) if (s_bEnabled)
{ {
// See: ARMv7-A Architecture Reference Manual, Section D7.3 // See: ARMv7-A Architecture Reference Manual, Section D7.3
@ -52,10 +52,12 @@ void SpinLock::Acquire(void)
: : "r" ((u32)&m_bLocked) : : "r" ((u32)&m_bLocked)
); );
} }
#endif
} }
void SpinLock::Release(void) void SpinLock::Release(void)
{ {
#ifdef HAS_MULTICORE
if (s_bEnabled) if (s_bEnabled)
{ {
// See: ARMv7-A Architecture Reference Manual, Section D7.3 // See: ARMv7-A Architecture Reference Manual, Section D7.3
@ -71,6 +73,6 @@ void SpinLock::Release(void)
: : "r" ((u32)&m_bLocked) : : "r" ((u32)&m_bLocked)
); );
} }
#endif
} }
//#endif