Commit graph

337 commits

Author SHA1 Message Date
Unknown W. Brackets
3fb2c8f654 Use a waitingThreads list for threadend.
The timeout wasn't being correctly written before, actually.
2013-09-08 11:15:09 -07:00
Unknown W. Brackets
b03be16fa6 Refactor thread end/delete a bit. 2013-09-08 10:50:55 -07:00
Henrik Rydgard
8c88dff5a4 More log categories, use them (and existing ones). Improve log config. 2013-09-07 22:02:55 +02:00
Unknown W. Brackets
d8d8d3b0ec Use a different wait type for async io. 2013-09-07 11:04:42 -07:00
Unknown W. Brackets
2a7e9a5afc Cleanup sceKernelCreateCallback().
And tweak sceKernelReferCallbackStatus().
2013-09-03 22:18:15 -07:00
Unknown W. Brackets
b20bb3b609 Refactor down the begin/end callback stuff. 2013-09-03 01:21:52 -07:00
Unknown W. Brackets
1bf974aff6 Implement VPL/FPL callback handlers.
Smells like time to refactor, there are less differences than I expected.
2013-09-03 01:21:51 -07:00
Unknown W. Brackets
648dd5f154 Don't allow sceKernelWakeupThread() on cur thread.
I don't know why you wouldn't allow this, but the PSP firmware doesn't.
2013-09-03 01:21:50 -07:00
Unknown W. Brackets
722b878428 Fix sceKernelReferThreadRunStatus() layout.
Was missing size, so all fields were wrong.
2013-09-03 01:21:50 -07:00
Unknown W. Brackets
8bf1ef2616 Add handlers for delay and sleep callbacks. 2013-09-03 01:21:49 -07:00
Unknown W. Brackets
15a0f39fa1 Return yet more errors while inside interrupts. 2013-08-28 23:15:13 -07:00
Unknown W. Brackets
17a5a42a14 Disable some common waits inside interrupts. 2013-08-27 23:55:37 -07:00
Unknown W. Brackets
61fae4e920 Return proper errors while dispatch disabled.
In at least the majority of waits.
2013-08-27 23:55:37 -07:00
Unknown W. Brackets
252bf04c64 sceKernelDelaySysClockThread() cleanup.
It doesn't wait either of course.
2013-08-27 23:55:35 -07:00
Unknown W. Brackets
1c51564896 Stop practicing thread necromancy. 2013-08-27 23:55:34 -07:00
Unknown W. Brackets
fa57e23305 Implement volatile memory lock waiting. 2013-08-26 01:04:37 -07:00
Unknown W. Brackets
8d7eb265be Log context switch time, shorten logging a bit.
This is really useful for seeing why games are slow or hanging.
2013-08-25 10:25:49 -07:00
Unknown W. Brackets
1ed8edb0d3 Avoid some dangerous hex constant widths. 2013-08-22 23:23:48 -07:00
Unknown W. Brackets
83bc12ea08 Reschedule in sceKernelReferThreadStatus().
It's often called in loops waiting for a thread to wake up.

Fixes .hack//Link's sluggish performance.
2013-08-15 07:56:35 -07:00
Unknown W. Brackets
846178a588 Optimize thread switching a bit.
~2.5% improvement in Zettai Hero Project (while multithreading.)
2013-08-15 01:26:16 -07:00
Unknown W. Brackets
0d5c66676d Correct result of sceKernelGetThreadExitStatus(0).
Fixes Zettai Hero Project's options menu.
2013-08-14 23:58:23 -07:00
Unknown W. Brackets
c8716d9a02 Fix a few minor typos + small reporting change. 2013-08-12 23:02:39 -07:00
Unknown W. Brackets
7ac67a8931 Add a function to walk the stack, not yet perfect.
Could use improvements, but with a decent symbol table does very well so
far in the games I tested it in.
2013-08-12 01:54:14 -07:00
Unknown W. Brackets
b1344f8254 Get rid of CoreTiming::AdvanceQuick().
It basically existed for savestates, so no longer needed.
Fixes issues with events not running when they should.
2013-08-07 00:32:29 -07:00
Unknown W. Brackets
4a4f07df8e Add waiting/resuming to TLS funcs.
Nice and simple, no callbacks or timeouts.
2013-07-31 00:22:36 -07:00
Unknown W. Brackets
0b5bdeb1d3 Fix some compile failures under big endian. 2013-07-28 21:04:17 -07:00
Unknown W. Brackets
8da6259aff More carefully check defines for endianness. 2013-07-25 22:25:50 -07:00
Unknown W. Brackets
81f7103e0b Use *_le for the sceKernel* funcs. 2013-07-25 08:04:34 -07:00
Henrik Rydgard
a3edda0bc7 Minor logging fixes 2013-07-17 22:27:49 +02:00
tpu
a4e447fe7e dont wake up thread with waitType WAITTYPE_MODULE in sceKernelReleaseWaitThread
add UTF-8 BOM to MiscScreens.cpp to avoid compile error.
2013-07-18 00:16:42 +08:00
Unknown W. Brackets
88ce95470c This one is worth reporting. 2013-07-07 18:10:32 -07:00
Kingcom
82c242f237 Added "Wait type" and "Priority" columns to thread list 2013-07-06 21:40:41 +02:00
Unknown W. Brackets
a1e69d1c4f Fix wrong thread id when resuming after interrupt.
Who knows what kind of havoc this was causing.
2013-07-04 02:04:06 -07:00
Unknown W. Brackets
933c8abb55 Check kernel object types when looking up ids.
Some games misuse it, need to return an error.
2013-06-18 23:54:29 -07:00
Unknown W. Brackets
1e805e7fc8 Return correct errors in sceKernelDeleteThread().
And also, don't reschedule in sceKernelTerminateDeleteThread(), per tests.
2013-06-15 00:05:21 -07:00
Unknown W. Brackets
1c1293826c Return correct errors on terminating thread.
Fixes Final Fantasy 4 hangs when playing videos a second time.
2013-06-09 18:56:36 -07:00
Unknown W. Brackets
fe1c26f2b2 Add a safety check for non-rtti. 2013-06-09 08:35:54 -07:00
Henrik Rydgard
2afbc94734 Turn off RTTI, simulate it where needed. 2013-06-09 13:02:16 +02:00
Unknown W. Brackets
0c41d4e952 Don't allow release wait for HLE delays.
Although, presumably the thread would stop waiting, I guess the HLE func
in most cases probably checks and re-waits?

Fixes breakage in Jeanne d' Arc, which constantly releases from wait the
main thread, but calls things like sceMpegCreate which do block.
2013-06-08 23:39:49 -07:00
Unknown W. Brackets
32a557803b Reporting in sceKernelChangeCurrentThreadAttr(). 2013-06-06 00:08:24 -07:00
Unknown W. Brackets
e4dc030b83 Reset restarted thread priorities properly. 2013-06-05 23:57:27 -07:00
Unknown W. Brackets
5fe537cac6 sceKernelChangeThreadPriority() can't do dormant. 2013-06-05 23:52:24 -07:00
Unknown W. Brackets
12005267ac Reschedule in sceKernelChangeThreadPriority().
Seems like this is another way to yield, makes sense.
2013-06-05 23:42:42 -07:00
Unknown W. Brackets
e16cd7d9d9 Validate params in sceKernelChangeThreadPriority(). 2013-06-05 23:04:42 -07:00
Unknown W. Brackets
06c19622d5 Fix some init/type warnings. 2013-05-31 23:14:29 -07:00
lioncash
743f5185b8 Missed including this in the __KernelSwitchContext null check fix.
This shouldn't be called if target is null.
2013-05-30 11:55:29 -04:00
lioncash
81a91fbcbb Ensure code inside method __KernelSwitchContext in sceKernelThread.cpp isn't unintentionally executed.
The null check around line 2935 for target also makes me think this was supposed to have been done.
2013-05-30 11:47:10 -04:00
Unknown W. Brackets
f397f83b4f Buildfix for Mac / iOS. 2013-05-26 19:02:40 -07:00
Unknown W. Brackets
727b3b4127 Get rid of the "root" return hack. 2013-05-26 10:36:18 -07:00
Unknown W. Brackets
c34854ead3 Use a custom RA for module funcs. Not used yet.
But it will be.
2013-05-26 10:28:08 -07:00