git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel - General fixing after ARM7 changes
[tpg/acess2.git]
/
Kernel
/
arch
/
arm7
/
include
/
lock.h
diff --git
a/Kernel/arch/arm7/include/lock.h
b/Kernel/arch/arm7/include/lock.h
index
9b289d1
..
e270145
100644
(file)
--- a/
Kernel/arch/arm7/include/lock.h
+++ b/
Kernel/arch/arm7/include/lock.h
@@
-26,6
+26,14
@@
static inline int CPU_HAS_LOCK(struct sShortSpinlock *Lock)
static inline int SHORTLOCK(struct sShortSpinlock *Lock)
{
static inline int SHORTLOCK(struct sShortSpinlock *Lock)
{
+ #if 0
+ while( __sync_lock_test_and_set( &Lock->Lock, 1 ) == 1 );
+ #endif
+ #if 1
+ while( Lock->Lock ) ;
+ Lock->Lock = 1;
+ #endif
+ #if 0
// Shamelessly copied from linux (/arch/arm/include/asm/spinlock.h) until I can fix stuff
Uint tmp;
__asm__ __volatile__ (
// Shamelessly copied from linux (/arch/arm/include/asm/spinlock.h) until I can fix stuff
Uint tmp;
__asm__ __volatile__ (
@@
-38,6
+46,7
@@
static inline int SHORTLOCK(struct sShortSpinlock *Lock)
: "r" (&Lock->Lock), "r" (1)
: "cc" // Condition codes clobbered
);
: "r" (&Lock->Lock), "r" (1)
: "cc" // Condition codes clobbered
);
+ #endif
return 1;
}
return 1;
}
UCC
git Repository :: git.ucc.asn.au