Commit graph

72 commits

Author SHA1 Message Date
bunnei
f34dd04d09 hle: kernel: Recode implementation of KThread to be more accurate. 2021-01-28 21:42:26 -08:00
bunnei
4ba9d6f969 hle: kernel: KThread: Clean up thread priorities. 2021-01-28 21:42:25 -08:00
bunnei
e74f682506 hle: kernel: KThread: Remove thread types that do not exist. 2021-01-28 21:42:25 -08:00
bunnei
3d70b4a4ea core: hle: kernel: Rename Thread to KThread. 2021-01-28 21:42:25 -08:00
bunnei
e89be18c79 hle: kernel: thread: Preserve thread wait reason for debugging only.
- This is decoupled from core functionality and used for debugging only.
2021-01-11 14:23:17 -08:00
bunnei
e19dca9193 yuzu: debugger: wait_tree: Handle unknown ThreadState. 2021-01-11 14:23:16 -08:00
bunnei
e5cfd63ba4 core: hle: Integrate new KConditionVariable and KAddressArbiter implementations. 2021-01-11 14:23:16 -08:00
bunnei
9744afa8b1 hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState.
- This is how the real kernel works, and is more accurate and simpler.
2021-01-11 14:23:16 -08:00
bunnei
2feb4d56e9 core: hle: kernel: Update KSynchronizationObject. 2021-01-11 14:23:16 -08:00
lat9nq
662c4a68f6 yuzu/main: Improve menubar access keys
Adds a unique access key to each action within each menu. A few actions
already had their own access key, so those were untouched.
2020-12-22 19:32:58 -05:00
bunnei
039844bbb9 hle: kernel: Rewrite scheduler implementation based on Mesopshere. 2020-12-06 00:03:24 -08:00
bunnei
ba09b4d69d hle: kernel: Port KAffinityMask from Mesosphere. 2020-12-06 00:03:24 -08:00
bunnei
b2de57e93e hle: kernel: thread: Remove unused "Running" state. 2020-11-29 01:31:52 -08:00
Morph
19b3180ae3 wait_tree: Include Midnight Blue dark themes 2020-07-20 01:25:25 -04:00
David Marcec
157dfba918 Address issues 2020-07-19 01:02:41 +10:00
David Marcec
4e11d6d05a frontend: Improve wait tree readability for dark themes 2020-07-18 20:22:03 +10:00
Fernando Sahmkow
adc86e3030 Clang Format. 2020-06-27 11:36:14 -04:00
Fernando Sahmkow
6f0c873d48 General: Cleanup legacy code. 2020-06-27 11:36:05 -04:00
Fernando Sahmkow
c22d3e1e18 ARM/WaitTree: Better track the CallStack for each thread. 2020-06-27 11:35:54 -04:00
Fernando Sahmkow
b121009e03 General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. 2020-06-27 11:35:48 -04:00
Fernando Sahmkow
119d9844db Yuzu/Debuggers: Correct Wait Tree for Paused threads. 2020-06-27 11:35:34 -04:00
Fernando Sahmkow
7ee76003ad General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host 
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and 
Suspended State, Recreates the bootmanager, Initializes Multicore 
system.
2020-06-27 11:35:06 -04:00
bunnei
048ac77adc core: Implement separate A32/A64 ARM interfaces. 2020-03-02 21:51:57 -05:00
Fernando Sahmkow
3a7f539463 Kernel: Change WaitObject to Synchronization object. In order to better reflect RE. 2020-02-11 10:46:25 -04:00
Lioncash
cc3d6fdf73 core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory class
With all of the trivial parts of the memory interface moved over, we can
get right into moving over the bits that are used.

Note that this does require the use of GetInstance from the global
system instance to be used within hle_ipc.cpp and the gdbstub. This is
fine for the time being, as they both already rely on the global system
instance in other functions. These will be removed in a change directed
at both of these respectively.

For now, it's sufficient, as it still accomplishes the goal of
de-globalizing the memory code.
2019-11-26 21:55:39 -05:00
bunnei
5cb0f276fe kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects.

- See https://github.com/citra-emu/citra/pull/4710 for details.
2019-11-24 20:15:51 -05:00
bunnei
eeef564c02 kernel: events: Remove ResetType::Automatic.
- This does not actually seem to exist in the real kernel - games reset these automatically.

# Conflicts:
#	src/core/hle/service/am/applets/applets.cpp
#	src/core/hle/service/filesystem/fsp_srv.cpp
2019-11-03 04:22:45 -05:00
Fernando Sahmkow
4760c27922 Correct compiling errors and addapt to the new interface. 2019-10-15 11:55:09 -04:00
Hexagon12
60e2920a47 Merge pull request #2492 from lioncash/debugger
yuzu/debugger: Specify string conversions explicitly
2019-05-19 14:49:54 +01:00
Lioncash
d1b2ed0a86 yuzu/debugger/wait_tree: Specify string conversions explicitly
Allows compiling the wait tree widget with implicit string conversions
disabled.
2019-05-19 01:10:05 -04:00
Lioncash
45d71eed4f core/kernel/object: Rename ResetType enum members
Renames the members to more accurately indicate what they signify.
"OneShot" and "Sticky" are kind of ambiguous identifiers for the reset
types, and can be kind of misleading. Automatic and Manual communicate
the kind of reset type in a clearer manner. Either the event is
automatically reset, or it isn't and must be manually cleared.

The "OneShot" and "Sticky" terminology is just a hold-over from Citra
where the kernel had a third type of event reset type known as "Pulse".
Given the Switch kernel only has two forms of event reset types, we
don't need to keep the old terminology around anymore.
2019-05-18 15:52:51 -04:00
Lioncash
b12ed4aba9 kernel/thread: Unify wait synchronization types
This is a holdover from Citra, where the 3DS has both
WaitSynchronization1 and WaitSynchronizationN. The switch only has one
form of wait synchronizing (literally WaitSynchonization). This allows
us to throw out code that doesn't apply at all to the Switch kernel.

Because of this unnecessary dichotomy within the wait synchronization
utilities, we were also neglecting to properly handle waiting on
multiple objects.

While we're at it, we can also scrub out any lingering references to
WaitSynchronization1/WaitSynchronizationN in comments, and change them
to WaitSynchronization (or remove them if the mention no longer
applies).
2019-04-17 09:30:56 -04:00
Fernando Sahmkow
fbff276b26 Add CondVar Thread State. 2019-03-19 20:32:47 -04:00
Lioncash
2c92a30baa yuzu/debugger/wait_tree: Remove use of global CurrentProcess accessor
We already have the thread instance that was created under the current
process, so we can just pass the handle table of it along to retrieve
the owner of the mutex.
2019-03-05 21:52:21 -05:00
Lioncash
c6d2828c74 kernel: Remove the Timer class
A holdover from citra, the Horizon kernel on the switch has no
prominent kernel object that functions as a timer. At least not
to the degree of sophistication that this class provided.

As such, this can be removed entirely. This class also wasn't used at
all in any meaningful way within the core, so this was just code sitting
around doing nothing. This also allows removing a few things from the
main KernelCore class that allows it to use slightly less resources
overall (though very minor and not anything really noticeable).
2019-01-31 23:05:15 -05:00
David Marcec
d0aaf94244 Removed pulse event type
Pulse is considered a hack and nothing should be using it. We should completely remove it
2019-01-04 20:47:20 +11:00
Lioncash
50aed99339 kernel: Rename 'default' CPU core to 'ideal' core
This makes the naming more closely match its meaning. It's just a
preferred core, not a required default core. This also makes the usages
of this term consistent across the thread and process implementations.
2018-12-27 21:48:49 -05:00
bunnei
037dfae35c Merge pull request #1849 from encounter/svcSetThreadActivity
svc: Implement SetThreadActivity (thread suspension)
2018-12-26 15:54:14 -05:00
Lioncash
061b5571b6 yuzu/wait_tree: Pass QString by value and std::move in the initializer list for WaitTreeText
Just a trivial modernization that potentially avoids copying strings in certain scenarios.
2018-12-05 18:34:03 -05:00
Luke Street
33473a7e7b debugger: Set paused thread color 2018-12-04 02:25:34 -05:00
Lioncash
59a4ed0d24 kernel/object: Amend handle types to distinguish between readable and writable events
Two kernel object should absolutely never have the same handle ID type.
This can cause incorrect behavior when it comes to retrieving object
types from the handle table. In this case it allows converting a
WritableEvent into a ReadableEvent and vice-versa, which is undefined
behavior, since the object types are not the same.

This also corrects ClearEvent() to check both kernel types like the
kernel itself does.
2018-12-04 02:20:47 -05:00
Luke Street
0652d95dab svc: Implement SetThreadActivity (thread suspension) 2018-12-04 01:23:50 -05:00
Zach Hilman
b0d0735e9b kernel/event: Reference ReadableEvent from WritableEvent 2018-11-29 08:48:40 -05:00
Zach Hilman
fe0071f8fa core: Port all current usages of Event to Readable/WritableEvent 2018-11-29 08:45:41 -05:00
Lioncash
e13c95fbe5 kernel/process: Make the handle table per-process
In the kernel, there isn't a singular handle table that everything gets
tossed into or used, rather, each process gets its own handle table that
it uses. This currently isn't an issue for us, since we only execute one
process at the moment, but we may as well get this out of the way so
it's not a headache later on.
2018-10-20 16:38:32 -04:00
Lioncash
f94bf1a29f core_cpu: Make Cpu scheduler instances unique_ptrs instead of shared_ptrs 2018-10-15 14:15:56 -04:00
Lioncash
e57c8ae2b3 kernel/thread: Make all instance variables private
Many of the member variables of the thread class aren't even used
outside of the class itself, so there's no need to make those variables
public. This change follows in the steps of the previous changes that
made other kernel types' members private.

The main motivation behind this is that the Thread class will likely
change in the future as emulation becomes more accurate, and letting
random bits of the emulator access data members of the Thread class
directly makes it a pain to shuffle around and/or modify internals.
Having all data members public like this also makes it difficult to
reason about certain bits of behavior without first verifying what parts
of the core actually use them.

Everything being public also generally follows the tendency for changes
to be introduced in completely different translation units that would
otherwise be better introduced as an addition to the Thread class'
public interface.
2018-10-04 00:14:15 -04:00
Lioncash
b051082129 arm_interface: Replace kernel vm_manager include with a forward declaration
Avoids an unnecessary inclusion and also uncovers three places where
indirect inclusions were relied upon, which allows us to also resolve
those.
2018-09-20 19:35:36 -04:00
fearlessTobi
1190ea6ddb Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
Lioncash
2300f0b951 kernel/thread: Include thread-related enums within the kernel namespace
Previously, these were sitting outside of the Kernel namespace, which
doesn't really make sense, given they're related to the Thread class
which is within the Kernel namespace.
2018-09-13 16:05:57 -04:00