Commit graph

147 commits

Author SHA1 Message Date
Henrik Rydgård
5f5ad32f7e Start cleaning up logging 2025-01-19 12:10:57 +01:00
Henrik Rydgård
739a32324d Thread view: Show wait type 2024-12-08 11:13:21 +01:00
Unknown W. Brackets
a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
Henrik Rydgård
a2669377eb
Merge pull request #14149 from unknownbrackets/usb-wait
Usb: Implement state waits
2021-02-16 00:02:08 +01:00
Unknown W. Brackets
cfbeadccc7 Usb: Implement state waits.
See #11067 - implementing in hopes of reducing spin.
2021-02-15 13:43:05 -08:00
Unknown W. Brackets
b9ae574679 Thread: Log error when delaying a waiting thread.
This will handle double delaying and delaying in general.
2021-02-06 23:55:46 -08:00
Henrik Rydgård
5c0ab8bea3 Guess at a fix for #13698 - sceKernelThreadGetExitStatus probably takes some cycles. 2020-11-23 09:09:36 +01:00
Unknown W. Brackets
ac7522b0dd Plugins: Schedule plugins before game thread. 2020-09-08 09:31:09 -07:00
ANR2ME
439171fc56 An attempt to reduce the lags/stutters during multiplayer caused by improper blocking behavior. 2020-09-04 13:09:44 +07:00
sum2012
80283d3230 Add a check in sceKernelExitDeleteThread 2020-08-18 21:03:45 +08:00
sum2012
35c05ef064 Use ppsspp error name 2020-08-18 06:42:55 +08:00
sum2012
df1f126715 Fix sceKernelExitThread
fix #13297 fix #9523
According from
https://github.com/jpcsp/jpcsp/blob/master/src/jpcsp/HLE/modules/ThreadManForUser.java#L3924
2020-08-17 23:16:15 +08:00
shenweip
c7e2eba231 Add basic Microphone support on Windows. 2020-07-31 10:24:17 +08:00
Henrik Rydgård
1010a07f65 Expose more information on the crash screen (current kernel thread) 2020-07-12 16:47:53 +02:00
Henrik Rydgård
e184ed368d Kernel: Add a little paranoia check on chained mipscalls.
See #13057
2020-07-12 10:39:25 +02:00
Unknown W. Brackets
54e1afda1e HLE: Make calling mips funcs simpler.
This makes their return value handling, scheduling, etc. more
straight-forward.
2020-03-22 06:59:43 -07:00
Unknown W. Brackets
7d36b70a8e Kernel: Rename conflicting kernel object names.
These are names that can often conflict with system headers in ports.
Let's just simplify by prefixing with PSP.

No actual functional/code changes, just syntax and names.
2020-03-15 08:33:40 -07:00
Unknown W. Brackets
593e48b865 Io: Update async priority more correctly.
When an operation finishes, whether it uses the priority from the first
operation or the current thread's priority depends on sdk version, it
seems.

This also makes it resolve the default priority on open, so that changing
the default afterward doesn't affect already open descriptors.
2020-01-03 14:24:52 -08:00
Unknown W. Brackets
f63daf8185 Io: Change async thread priority if running.
Really thought I'd already done this, must've made a mistake...
Fixes #12400.
2019-10-20 10:26:37 -07:00
Unknown W. Brackets
dd804660c9 Psmf: Use kernel memory for helper thread stack.
Also, thread stacks must be 0x200 or larger.
2019-09-01 08:16:05 -07:00
Unknown W. Brackets
f244b390ae Kernel: Kernel threads can beget kernel threads.
Fixes #7687.
2019-03-23 12:05:06 -07:00
Unknown W. Brackets
5670fc03ae Debugger: Add debug interfaces for threads.
This way we can switch context.
2018-06-08 06:59:18 -07:00
Unknown W. Brackets
97cce6ccfe ThreadEvent: Trigger handlers for start/exit too.
Start isn't in the right place or on the right thread, and exit isn't on
the right thread either.  But these don't seem very particular about what
thread they run on.
2016-05-28 21:19:28 -07:00
Unknown W. Brackets
c6cd614f2b Thread: Allow mipscalls to be scheduled in a row.
Should be fine to just use the stack to save these things, likely that's
what happens in real firmware.  This fixes issues when a second mipscall
is scheduled in the same HLE syscall.
2016-05-28 21:18:03 -07:00
Unknown W. Brackets
e9916bdf0b ThreadEvent: Add management functions.
Currently never being triggered, though.
2016-05-28 21:17:16 -07:00
Unknown W. Brackets
909e4b9bd8 Switch lo and hi so that low comes first.
This way we can treat it as a single 64-bit value.
2015-06-28 10:42:19 -07:00
Unknown W. Brackets
8d5f843bb8 Cleanup thread start and create logging.
Also report less cases.
2015-03-28 14:46:09 -07:00
Unknown W. Brackets
fcf0518223 Update all the HLE tables with arg and ret info. 2015-03-22 20:51:55 -07:00
Henrik Rydgard
fd1dcb881f Add ability to flag function to clear a bit of stack. See #6374, idea by JPCSP, pointed out by sum2012. 2015-03-02 01:03:12 +01:00
Peter Tissen
a7d9370a69 don't use Thread* to create thread
slightly less hacky, as in, a little bit closer to what the actual PSP does, although the timings are still complete guesses

also

* Protect the adhoc Events by a mutex lock
* don't use emplace_back since symbian doesn't compile with it
2015-01-04 18:58:42 +01:00
sum2012
589cf551a0 Revert "Fixed an issue when MipsCall executed on any random thread instead of it's own thread causing some registers to be corrupted and leading to invalid address access"
This reverts commit 8a65d73ad2.
2015-01-04 13:04:05 +01:00
AdamN
3dc6eed05b Giving access to some Kernel functions in order to execute MipsCall on the right thread instead of any random thread (current thread) 2015-01-04 13:04:01 +01:00
AdamN
69fb339a83 Fixed an issue when MipsCall executed on any random thread instead of it's own thread causing some registers to be corrupted and leading to invalid address access 2015-01-04 13:04:01 +01:00
Unknown W. Brackets
8851fc1685 Remove savedIdRegister/MIPS_CALL_ID.
We've never trusted it anyway, simpler without dealing with this stuff.
2014-06-22 11:29:47 -07:00
Unknown W. Brackets
b9ede6aade Add a class to create helper threads from HLE.
This should be usable from sceIo as well.
2014-05-22 23:38:21 -07:00
Unknown W. Brackets
a843cbd580 Shrink the very common sceKernelThread.h include. 2014-03-15 11:44:02 -07:00
lioncash
b9886942a7 Fix some vertical alignments in misc Core source files. 2014-03-03 11:16:53 -05:00
Henrik Rydgård
e5e17fbc6e More include cleanup. Hoping for very slightly faster compile times.. 2013-12-30 10:49:05 +01:00
Henrik Rydgård
00c32ddadb Mostly get rid of including "Globals.h" 2013-12-30 10:17:11 +01:00
Unknown W. Brackets
e73d43c434 Correct sceKernelTlspl func names, etc.
This is mostly pedantic but it's nice to have the right names.
2013-12-02 23:40:16 -08:00
Unknown W. Brackets
26f5922174 Return the correct value for fcr0/fir.
This is what the PSP actually returns, it's read only.
2013-11-14 23:39:08 -08:00
Unknown W. Brackets
04ec987448 Initialize thread regs with 0xDEADBEEF.
Also initialize the float regs to NaN.
2013-10-29 21:39:24 -07:00
Unknown W. Brackets
b928f50353 Cleanup sceKernelRegisterExitCallback() per tests. 2013-09-29 01:10:07 -07:00
Unknown W. Brackets
a7ec139b5a Savestate the exit callback, reporting.
Seems like LoadExecForUser_362A956B() uses it, so we need to save it.
I have no confidence that function works correctly, so let's report it.
2013-09-29 00:19:54 -07:00
Unknown W. Brackets
64b75ed3ff Decentralize callback registration.
Callbacks are always tied to THEIR thread, and the registration was all
based on the current thread which is just not the right way.
2013-09-09 00:21:15 -07:00
Unknown W. Brackets
6d8213b0c5 Always specify retval when resuming a thread. 2013-09-08 12:02:18 -07:00
Unknown W. Brackets
4c828cd9a0 Remove __KernelTriggerWait(), no longer used. 2013-09-08 11:58:40 -07: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