summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/swtch.S
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/aim/swtch.S')
-rw-r--r--sys/powerpc/aim/swtch.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/powerpc/aim/swtch.S b/sys/powerpc/aim/swtch.S
index 038e788..1a09d87 100644
--- a/sys/powerpc/aim/swtch.S
+++ b/sys/powerpc/aim/swtch.S
@@ -67,13 +67,17 @@
#include <machine/asm.h>
/*
- * void cpu_switch(struct thread *old, struct thread *new)
+ * void cpu_switch(struct thread *old,
+ * struct thread *new,
+ * struct mutex *mtx);
*
* Switch to a new thread saving the current state in the old thread.
*/
ENTRY(cpu_switch)
- lwz %r5,TD_PCB(%r3) /* Get the old thread's PCB ptr */
+ stw %r5,TD_LOCK(%r3) /* ULE: update old thread's lock */
+ /* XXX needs to change for MP */
+ lwz %r5,TD_PCB(%r3) /* Get the old thread's PCB ptr */
mr %r12,%r2
stmw %r12,PCB_CONTEXT(%r5) /* Save the non-volatile GP regs.
These can now be used for scratch */
OpenPOWER on IntegriCloud