unknownbrackets / ps2autotests

A set of test programs run on a PS2, with accompanying results.
ISC License
25 stars 7 forks source link

IOP DeleteThread test #38

Closed jpd002 closed 8 years ago

jpd002 commented 8 years ago

Pretty straight forward. Just testing behavior and return values for DeleteThread system call on the IOP.

unknownbrackets commented 8 years ago

On the PSP, one slightly interesting thing is the exit value of the thread. When deleted, the exit value is SCE_KERNEL_ERROR_THREAD_TERMINATED. But I guess thread exit values aren't really a thing here.

-[Unknown]

jpd002 commented 8 years ago

Funny, I didn't realize that threads on the PS2 didn't have explicit exit values. I guess it would be possible to obtain a thread's procedure return value by inspecting the thread's register context directly, but I doubt the kernel is touching that in any way.

In any case, thanks for the merge!

unknownbrackets commented 8 years ago

Hmm, that makes me wonder, if a thread is restarted, does its entire context get reset? Probably an edge case, but we did see this occur on the PSP. So there was no way to really tell (at least for a game) if the context was modified or not by delete, iirc.

-[Unknown]