Skip to content

Commit

Permalink
Fixed compile errors for other Pi builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
pi1541 committed Dec 30, 2018
1 parent 4dc0fd4 commit 2979c69
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/SpinLock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#include "SpinLock.h"

//#ifdef HAS_MULTICORE
#include "defs.h"

bool SpinLock::s_bEnabled = true;

Expand All @@ -34,6 +33,7 @@ SpinLock::~SpinLock(void)

void SpinLock::Acquire(void)
{
#ifdef HAS_MULTICORE
if (s_bEnabled)
{
// See: ARMv7-A Architecture Reference Manual, Section D7.3
Expand All @@ -52,10 +52,12 @@ void SpinLock::Acquire(void)
: : "r" ((u32)&m_bLocked)
);
}
#endif
}

void SpinLock::Release(void)
{
#ifdef HAS_MULTICORE
if (s_bEnabled)
{
// See: ARMv7-A Architecture Reference Manual, Section D7.3
Expand All @@ -71,6 +73,6 @@ void SpinLock::Release(void)
: : "r" ((u32)&m_bLocked)
);
}
#endif
}

//#endif

0 comments on commit 2979c69

Please sign in to comment.