Assert the CPU index on set.
This commit is contained in:
parent
27610989a2
commit
dd18112905
|
@ -704,6 +704,7 @@ uint32_t XThread::active_cpu() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void XThread::SetActiveCpu(uint32_t cpu_index) {
|
void XThread::SetActiveCpu(uint32_t cpu_index) {
|
||||||
|
assert_true(cpu_index < 6);
|
||||||
uint8_t* pcr = memory()->TranslateVirtual(pcr_address_);
|
uint8_t* pcr = memory()->TranslateVirtual(pcr_address_);
|
||||||
xe::store_and_swap<uint8_t>(pcr + 0x10C, cpu_index);
|
xe::store_and_swap<uint8_t>(pcr + 0x10C, cpu_index);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue