patch-2.4.22 linux-2.4.22/arch/ppc/lib/locks.c
Next file: linux-2.4.22/arch/ppc/lib/string.S
Previous file: linux-2.4.22/arch/ppc/lib/checksum.S
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/ppc/lib/locks.c
- Orig date:
2003-06-13 07:51:31.000000000 -0700
diff -urN linux-2.4.21/arch/ppc/lib/locks.c linux-2.4.22/arch/ppc/lib/locks.c
@@ -1,6 +1,6 @@
/*
- * Locks for smp ppc
- *
+ * Locks for smp ppc
+ *
* Written by Cort Dougan (cort@cs.nmt.edu)
*/
@@ -70,7 +70,7 @@
{
if (__spin_trylock(&lock->lock))
return 0;
- lock->owner_cpu = smp_processor_id();
+ lock->owner_cpu = smp_processor_id();
lock->owner_pc = (unsigned long)__builtin_return_address(0);
return 1;
}
@@ -101,7 +101,7 @@
unsigned long stuck = INIT_STUCK;
int cpu = smp_processor_id();
-again:
+again:
/* get our read lock in there */
atomic_inc((atomic_t *) &(rw)->lock);
if ( (signed long)((rw)->lock) < 0) /* someone has a write lock */
@@ -153,7 +153,7 @@
}
goto again;
}
-
+
if ( (rw)->lock & ~(1<<31)) /* someone has a read lock */
{
/* clear our write lock and wait for reads to go away */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)