Commit Graph

337 Commits

Author SHA1 Message Date
Unknown W. Brackets
a779645152 Wrap sceKernelGetThreadExitStatus().
So it's usable internally too.
2013-05-26 10:17:59 -07:00
Unknown W. Brackets
2c4254d0c8 Disallow suspend/resume on current thread.
Might be some extra subtle things with callbacks/interrupts here...
2013-05-26 02:25:53 -07:00
Unknown W. Brackets
e6795b1a41 Initial attempt at a suspend/resume thread impl. 2013-05-26 01:01:29 -07:00
Unknown W. Brackets
690e52bc34 Make sure we keep the suspend state around.
I assume it sticks around in this case.
2013-05-25 23:57:04 -07:00
Unknown W. Brackets
084ad5aa53 Wrap the sleep/wakeup HLE funcs. 2013-05-25 20:43:19 -07:00
Unknown W. Brackets
8adf1e9ede Properly return success in sceKernelWakeupThread().
Fixes #1596, fixes #1796, possibly others.  I can't believe how long
I stared at this code and debugged it without noticing such a simple
thing...
2013-05-25 20:28:22 -07:00
Henrik Rydgard
4b15fe3c5e Minor cleanup 2013-05-19 18:45:58 +02:00
raven02
c378af0878 Fix Dragon Ball Z Tenkaichi Tag Team 2013-05-19 19:56:18 +08:00
Unknown W. Brackets
ead70f56d9 Add a safety check to prevent leaks. 2013-05-18 20:21:29 -07:00
Unknown W. Brackets
0fb5877d75 Implement sceKernelExtendThreadStack().
Fixes #1833.  Implemented using fake nids instead of callbacks since
it's simpler to get them (and waits and recursion) right.
2013-05-18 20:21:28 -07:00
Unknown W. Brackets
f91135cedf Prevent some threading related NULL derefs. 2013-05-18 10:19:34 -07:00
Henrik Rydgård
c13a101901 Merge pull request #1765 from unknownbrackets/perf
Eat cycles in sceKernelReferThreadStatus()
2013-05-11 14:31:42 -07:00
Unknown W. Brackets
16fe2c9691 Eat cycles in sceKernelReferThreadStatus().
Improves .hack//Link (demo)'s perf significantly, doesn't hurt anyone
else.
2013-05-11 12:25:55 -07:00
Unknown W. Brackets
5318e97a2e Threads starting better threads should stay at top.
This wasn't correct, I think I must've added it because something else
should've been rescheduling.
2013-05-11 11:28:37 -07:00
Henrik Rydgard
5fc8de091d Make some logging VERBOSE 2013-05-09 11:18:38 +02:00
Unknown W. Brackets
bf826ed9c1 Correct delay for sceKernelDelayThread(0).
It's not 200 for 0, more like 100ish.
2013-05-04 23:42:10 -07:00
Unknown W. Brackets
f1f2cf0603 Replace some hleEatCycles() with actual PSP timing.
Measured several runs at 8 per run with test overhead check.
2013-05-04 23:42:10 -07:00
nachume
2181b76c42 ISO that replaced EBOOT.BIN is playable.
implement LoadExecForUer_362A956B() and sceKernelRegisterExitCallback.
Add some ERROR define on kernel.h. I was referring to the jpcsp.
2013-05-04 20:34:33 +09:00
Unknown W. Brackets
b18235d2e0 Sneak in a quick logging fix. 2013-04-28 11:27:05 -07:00
Unknown W. Brackets
acdd14f0d4 Fix initial thread stack, arg space and alignment.
Anything that used > 256 bytes of args was probably broken...
2013-04-28 00:34:49 -07:00
Unknown W. Brackets
d131588a6d Validate sceKernelStartThread() args better. 2013-04-28 00:34:49 -07:00
Unknown W. Brackets
df62cafe3d Handle a few errors on thread create better.
Especially out of stack space.
2013-04-28 00:34:48 -07:00
Unknown W. Brackets
fb758de3b9 sceKernelWakeupThread() should reschedule on wake.
Otherwise it will have different timing than the PSP.
2013-04-28 00:34:48 -07:00
Unknown W. Brackets
c8958a253d Cleanup some unused / duplicate code in threading. 2013-04-28 00:34:48 -07:00
Unknown W. Brackets
e30dedd46f Allocate thread stack on create, not on start.
Also, don't free and reallocate on thread reset.
2013-04-28 00:34:47 -07:00