Commit Graph
91 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Sonnet 5 21b7ce7392 Expose EventFlag/Mutex/Semaphore/MsgPipe/Callback in their headers
These KernelObject subclasses (and their Native* status structs) were
private implementation details of their respective .cpp files. Move them
into the matching .h instead, so external code - specifically the upcoming
WebSocket kernel-object introspection endpoints - can read a live object's
state directly via kernelObjects.Get<T>()/Iterate<T>(), the same way
PSPModule/PSPThread already can. Read-only by convention: nothing outside
each file should call DoState() or otherwise mutate these; the fields are
public here for that file's own pre-existing use, not an invitation to
write from elsewhere.

To avoid pulling each type's full dependency set (Memory::, BlockAllocator,
CoreTiming, HLEKernel::...) into headers many other files include, non-trivial
method bodies (DoState, and MsgPipe's buffer/wait-list management) are
declared in the header but still defined out-of-line in the .cpp, same as
before - only genuinely trivial one-liners went inline.

KernelObjectPool also gains IterateAll(), a type-agnostic sibling of the
existing Iterate<T>() - walks every live kernel object regardless of type,
for a coarse "what's alive right now" overview.

No behavior change - this is a pure visibility/declaration-vs-definition
move, not new functionality. That lands in a follow-up commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
2026-08-17 16:01:23 +02:00
Henrik Rydgård c5e4d0d90d Rename the get-memory-pointer functions to make it clear where CPU exceptions can happen. 2026-08-12 14:06:16 +02:00
Henrik Rydgård 5198317e24 Back out some excessive checking in the latest changes. Change TOOD: to TODO: . 2026-08-11 22:27:44 +02:00
Henrik Rydgård 0596ee97f6 More memory access cleanup 2026-08-11 20:14:01 +02:00
Henrik Rydgård 3bd41376da More memory cleanup 2026-08-11 20:12:10 +02:00
Henrik Rydgård 3c81d6b121 More manual Read_U32 cleanup
Buildfix
2026-08-11 10:28:36 +02:00
Henrik Rydgård 0f840e6240 Move JPEG error codes to the big enum, some include cleanup 2025-03-21 20:44:46 +01:00
Henrik Rydgård 607f4cc3e5 More 2025-03-05 17:02:46 +01:00
Henrik Rydgård 28b2c7f540 HLE log rename part 1: Remove duplicate log functions. Return type should be determined by metadata. 2025-01-29 09:45:39 +01:00
Henrik Rydgård 9165711cef Convert more HLE logging to the hleLog system 2025-01-19 15:53:20 +01:00
Henrik Rydgård bb914ca4bf More kernel logging cleanup 2025-01-19 15:36:59 +01:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Herman Semenov af41281761 [Core/Dialog/ELF/FileSystems/HLE/HW/Util] Added const reference for function params 2023-12-14 14:22:24 +03:00
Unknown W. Brackets 32feb82d16 HLE: Capture better allocation names.
We know which FPL, so don't just say "FPL".
2023-09-02 22:55:45 -07:00
Unknown W. Brackets 251cc73afd Kernel: Allow volatile for MsgPipe buffers. 2022-09-20 09:20:05 -07:00
Unknown W. Brackets ccd4e92184 Kernel: Use PSPPointer for status objects.
Code makes more sense when reading ->size rather than offset 0.
2022-09-03 10:44:12 -07:00
Henrik Rydgård e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
Unknown W. Brackets e7b968be73 Debugger: Notate Memcpys directly as well. 2021-02-15 15:01:23 -08:00
Unknown W. Brackets f32f89dd90 Global: Remove some unused variables. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Unknown W. Brackets 1dc5ee424b SaveState: Split out Do types to reduce headers. 2020-08-10 08:03:44 +00:00
Unknown W. Brackets 4b4e3432cd SaveState: Split Do() into a separate header. 2020-08-10 08:03:41 +00:00
Henrik Rydgård df6d0a8ae7 PSP kernel: Improve logging when accessing bad kernel object handles. 2020-07-20 11:57:11 +02:00
Unknown W. Brackets 2450724be2 Make Memory::Memcpy() execute memchecks directly.
This makes it easier to handle breakpoints in HLE.
2015-04-05 18:09:20 -07:00
chinhodado 81197f18a0 Avoid calling GetPointer() multiple times in a row 2014-12-22 22:46:37 -05:00
Lioncash cac632424c Core: Add missing override specifiers 2014-12-08 15:20:31 -05:00
Lioncash 4ccb838306 Core: Mark some module functions as static 2014-12-08 04:40:08 -05:00
Unknown W. Brackets 6599430c04 Improve some timing in msgpipes.
Probably not super important, but makes tests happier.

Also, when unscheduling an event, return the current time left, including
already spent time since last Advance.
2014-09-01 20:03:58 -07:00
Unknown W. Brackets 0a33eb4c42 Fix missing log semicolons only affecting logging. 2014-06-29 19:09:39 -07:00
Unknown W. Brackets 0078faef8b Fix some log semicolons that might affect logic.
But, these should all be right.
2014-06-29 19:09:38 -07:00
Unknown W. Brackets 05ab192c9c Reduce includes in Core/HLE/.
Especially templates.
2014-03-15 11:22:19 -07:00
Unknown W. Brackets 1b1a8cef02 Fix a potential null pointer. 2013-10-05 11:13:40 -07:00
Unknown W. Brackets 49bd553238 Avoid some shadowing warnings. 2013-10-05 11:13:39 -07:00
Unknown W. Brackets 50e9e45d65 Check version in each DoState() func.
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Unknown W. Brackets be468af52d Refactor waiting thread removal. 2013-09-09 00:22:00 -07:00
Unknown W. Brackets 4bd391b098 Refactor waiting thread cleanup. 2013-09-09 00:22:00 -07:00
Unknown W. Brackets d348b9d47a Add callback handlers for msgpipes. 2013-09-08 15:06:36 -07:00
Unknown W. Brackets 9a2beffea5 Refactor and add a way to remove msgpipe waits. 2013-09-08 15:06:35 -07:00
Unknown W. Brackets f59d799a5b Reorganize msgpipes code a bit to prep. for cbs.
No real changes.
2013-09-08 15:06:34 -07:00
Unknown W. Brackets 136d0b5c50 Split msgpipe handling logic from wait/resched.
This way I can reuse it for the callback stuff.
2013-09-08 15:06:34 -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 f35b164d11 Refactor wait verification a bit in kernel waits. 2013-09-07 10:54:00 -07:00
Unknown W. Brackets 543df7ca7a Refactor wait timeouts.
Also, make them not write the timeout ptr if the thread stopped waiting.
Feels safer.
2013-09-03 22:32:22 -07:00
Unknown W. Brackets 7349de55d1 Fix some initialization/sprintf warnings. 2013-09-01 01:15:07 -07:00
Henrik Rydgard 0d0b43818c Warning fixes and stuff 2013-08-30 20:14:16 +02:00
Unknown W. Brackets 686d893d5c Return more correct errors inside interrupts. 2013-08-28 22:35:06 -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 354dbfec6c Improve some reporting of options structs. 2013-08-25 16:43:47 -07:00
Unknown W. Brackets ec46fdd06c Warning fixes in msgpipes. 2013-08-24 15:36:24 -07:00
Unknown W. Brackets 4f7f963274 Correct sceKernelReferMsgPipeStatus(). 2013-08-18 18:45:43 -07:00