Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/powerpc/swtch64.S
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | blocked_loop: | ||||
ld %r7,TD_LOCK(%r13) | ld %r7,TD_LOCK(%r13) | ||||
cmpd %r6,%r7 | cmpd %r6,%r7 | ||||
beq- blocked_loop | beq- blocked_loop | ||||
isync | isync | ||||
#endif | #endif | ||||
ld %r17,TD_PCB(%r13) /* Get new PCB */ | ld %r17,TD_PCB(%r13) /* Get new PCB */ | ||||
ld %r1,PCB_SP(%r17) /* Load the stack pointer */ | ld %r1,PCB_SP(%r17) /* Load the stack pointer */ | ||||
addi %r1,%r1,-48 /* Remember about cpu_switch stack frame */ | |||||
/* Release old thread now that we have a stack pointer set up */ | /* Release old thread now that we have a stack pointer set up */ | ||||
cmpdi %r14,0 | cmpdi %r14,0 | ||||
beq- 1f | beq- 1f | ||||
std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ | std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ | ||||
1: mfsprg %r7,0 /* Get the pcpu pointer */ | 1: mfsprg %r7,0 /* Get the pcpu pointer */ | ||||
std %r13,PC_CURTHREAD(%r7) /* Store new current thread */ | std %r13,PC_CURTHREAD(%r7) /* Store new current thread */ | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |