Commit graph

80 commits

Author SHA1 Message Date
Liam 45c87c7e6e core: refactor emulated cpu core activation 2023-12-04 10:37:16 -05:00
Liam 9f91ba1f73 arm: Implement native code execution backend 2023-11-25 00:46:47 -05:00
Liam 8c59543ee3 kernel: update KProcess 2023-10-21 20:03:41 -04:00
Morph b94e576653 kernel: Synchronize 2023-07-01 16:21:22 -04:00
Kelebek1 5da70f7197 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
lat9nq e34e1b1c95 k_thread: Use a mutex and cond_var to sync bool
std::atomic<bool> is broken on MinGW and causes deadlocks there.
Use a normal cond var in its stead.
2023-06-17 15:25:36 -04:00
Liam b143ce8134 kernel: remove general boost lists 2023-04-29 22:11:32 -04:00
Liam 41d99aa89d memory: rename global memory references to application memory 2023-03-23 20:28:47 -04:00
Liam fb49ec19c1 kernel: use KTypedAddress for addresses 2023-03-22 09:35:16 -04:00
Liam 6bfb4c8f71 kernel: convert KThread to new style 2023-03-12 22:09:09 -04:00
Liam c0b9e93b77 kernel: remove kernel_ 2023-03-12 22:09:09 -04:00
Liam 097c25b164 kernel: convert KPort, KSession 2023-03-12 22:06:53 -04:00
Liam 484641003c kernel: clone fpu status on CreateThread 2023-03-07 19:18:06 -05:00
Liam 97f7f7bad5 kernel: be more careful about kernel address keys 2023-03-01 10:42:45 -05:00
Liam c4ba088a5d kernel: refactor priority inheritance to represent locks as C++ objects 2023-03-01 10:42:45 -05:00
Liam a936972614 service: refactor server architecture
Converts services to have their own processes
2023-02-21 12:19:25 -05:00
Liam 4363ca304a kernel: use GetCurrentProcess 2023-02-13 11:05:14 -05:00
Levi Behunin d5fc56db4b Move to Clang Format 15
Depends on https://github.com/yuzu-emu/build-environments/pull/69

clang-15 primary run
2023-01-29 17:49:42 -07:00
Liam 693cad8e9b kernel: split SetAddressKey into user and kernel variants 2023-01-23 20:31:03 -05:00
Liam 5086380a63 kernel: fix incorrect locking order in suspension 2023-01-23 17:14:41 -05:00
Liam c770f25ccb kernel: remove TimeManager 2022-12-18 20:21:24 -05:00
Liam 67c0d714c5 kernel: add KHardwareTimer 2022-12-18 16:37:19 -05:00
Lioncash dddc9bb8f1 kernel/thread: Ensure stack_top and argument are always initialized 2022-12-05 15:19:36 -05:00
Liam e6fe40428c service_thread: register service threads to the logical owner process 2022-11-04 09:18:57 -04:00
Liam 1a378a7769 kernel: refactor dummy thread wakeups 2022-10-24 19:52:01 -04:00
bunnei 57a77e9ff4 core: hle: kernel: k_thread: Implement thread termination DPC. 2022-10-18 19:13:34 -07:00
Liam da07e13e07 kernel: fix single-core preemption points 2022-07-14 22:47:18 -04:00
Liam 21945ae127 kernel: fix issues with single core mode 2022-07-14 22:47:18 -04:00
Liam 0624c880bd kernel: use KScheduler from mesosphere 2022-07-14 22:47:18 -04:00
Liam ed0319cfed common/fiber: make fibers easier to use 2022-07-02 12:33:49 -04:00
german77 a7d9be1384 core: Replace all instances of ResultCode with Result 2022-06-26 20:21:37 -05:00
Liam 2c56e94702 kernel: make current thread pointer thread local 2022-06-23 00:28:00 -04:00
Liam 24d7aaf43c kernel: wait for threads to stop on pause 2022-06-18 16:54:33 -04:00
Liam 07922abffc core/debugger: Support reading guest thread names 2022-06-01 21:25:32 -04:00
Liam 989d4a7a41 core/debugger: Improved stepping mechanism and misc fixes 2022-06-01 02:15:15 -04:00
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
bunnei 3f0b93925f core: hle: kernel: k_thread: Rework dummy thread waiting. 2022-04-11 21:15:38 -07:00
bunnei 8deaac8bd1 hle: kernel: Use std::mutex instead of spin locks for most kernel locking. 2022-04-11 21:13:40 -07:00
lat9nq 6bcbbb29e7 k_thread: Fix data race
TSan reports a data race between writing at cpp:1162 and reading at
h:262. Make the thread_state atomic to prevent this.
2022-04-03 21:47:58 -04:00
bunnei 25c0acc388 core: hle: kernel: k_thread: Update to reflect tree changes. 2022-03-14 18:14:53 -07:00
bunnei 615fb40416 hle: kernel: KThread: Ensure host (dummy) threads block on locking.
- But do not enter the priority queue, as otherwise they will be scheduled.
- Allows dummy threads to use guest synchronization primitives.
2022-01-21 17:12:06 -08:00
bunnei 46a620f9d7 hle: kernel: KThread: Decrease DummyThread priority to ensure it is never scheduled. 2022-01-20 17:08:00 -08:00
bunnei f6cbb14dce hle: kernel: KThread: Rename thread_type_for_debugging -> thread_type.
- This will be used to ensure that we do not schedule dummy threads.
2022-01-20 17:08:00 -08:00
bunnei f499c8177e core: hle: kernel: KThread: Integrate with KWorkerTask and implement DoWorkerTaskImpl.
- This is used to terminate a thread asynchronously after it has been exited.
- This fixes a crash that can occur in Pokemon Sword/Shield because a thread is incorrectly closed on svcExitThread, then, the thread is destroyed on svcCloseHandle while it is still scheduled.
- Instead, we now wait for the thread to no longer be scheduled on all cores before destroying it from KWorkerTaskManager, which is accurate to HOS behavior.
2022-01-14 16:44:14 -08:00
bunnei 03884b7ea6 core: hle: kernel: KThread: Replace Suspend with UpdateState & various updates.
- This makes our implementations of these more closely match HOS.
2022-01-14 16:44:14 -08:00
bunnei 3a89723d97 core: hle: kernel: Implement thread pinning.
- We largely had the mechanics in place for thread pinning, this change hooks these up.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_thread_pinning.cpp.
2021-12-30 15:50:45 -08:00
bunnei 42697527ba hle: kernel: k_thread: Rename sleeping_queue -> wait_queue. 2021-12-06 16:39:18 -08:00
bunnei 0d9afdedc4 hle: kernel: k_thread: Treat dummy threads as a special type. 2021-12-06 16:39:18 -08:00
bunnei abbea575cf hle: kernel: Add a flag for indicating that the kernel is currently shutting down. 2021-12-06 16:39:17 -08:00
bunnei 8f4ff06c4c hle: kernel: Cleanup to match coding style. 2021-12-06 16:39:17 -08:00