Subv
17b29d8865
WaitSynch: Removed unused variables and reduced SharedPtr copies.
Define a variable with the value of the sync timeout error code.
Use a boost::flat_map instead of an unordered_map to hold the equivalence of objects and wait indices in a WaitSynchN call.
9 years ago
Subv
7cde5b83bc
Use boost remove_erase_if instead of the erase-remove idiom
9 years ago
Subv
1f286b72a1
Improved the algorithm for GetHighestPriorityReadyThread.
9 years ago
Subv
bdad00c73f
Threading: Added some utility functions and const correctness.
9 years ago
Subv
8634b8cb83
Threading: Reworked the way our scheduler works.
Threads will now be awakened when the objects they're waiting on are signaled, instead of repeating the WaitSynchronization call every now and then.
The scheduler is now called once after every SVC call, and once after a thread is awakened from sleep by its timeout callback.
This new implementation is based off reverse-engineering of the real kernel.
See https://gist.github.com/Subv/02f29bd9f1e5deb7aceea1e8f019c8f4 for a more detailed description of how the real kernel handles rescheduling.
9 years ago
Subv
1323ab2f5f
Kernel/Loader: Grab the system mode from the NCCH ExHeader.
3dsx and elf files default to system mode 2 (96MB allocated to the application).
This allows Home Menu to boot without modifications.
Closes #1849
9 years ago
Subv
4ab8692475
Kernel/Events: Log an error when trying to create Pulse events and timers.
Related to #1904
9 years ago
Ricardo de Almeida Gonzaga
13d46f6820
Fix typos
9 years ago
wwylele
85a83158fb
move ResetType to kernel.h
10 years ago
wwylele
f69a543110
implement wait tree widget
10 years ago
Yuri Kunde Schlesner
84fbbe2629
Use negative priorities to avoid special-casing the self-include
9 years ago
Emmanuel Gil Peyrot
ebdae19fd2
Remove empty newlines in #include blocks.
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner
396a8d91a4
Manually tweak source formatting and then re-run clang-format
9 years ago
Emmanuel Gil Peyrot
dc8479928c
Sources: Run clang-format on everything.
9 years ago
bunnei
05e120a4cc
arm: ResetContext shouldn't be part of ARM_Interface.
9 years ago
Lectem
a94fb932ff
fix #1942 and adds a few IPC functions for descriptors
10 years ago
Subv
7b445ddff0
Kernel/SVC: Implemented svcCreatePort.
10 years ago
Subv
3d9fbffbab
Kernel: Added ClientPort and ServerPort classes.
This is part of an ongoing effort to implement support for multiple processes.
10 years ago
wwylele
7d56e88369
Thread: update timeout when rerunning WaitSynch
10 years ago
mailwl
e85b22320a
Fix parameter name in EnableNotification
10 years ago
wwylele
81d3462a19
Switch context on the same thread if necessary
10 years ago
MerryMage
80abe6eb08
Memory: Added necessary headers and removed unnecessary header
10 years ago
MerryMage
1ebaaf9bb1
Kernel/Thread: Remove use of Memory::GetPointer
10 years ago
Jannik Vogel
af37dd0d52
Set fpscr for new threads
10 years ago
Subv
64da2bf0cd
Memory: Fixed a regression caused by #1695 and #1689 .
Reserve enough space in the vector that holds the linear heap memory to prevent relocations of the backing memory when growing too much.
Closes #1790
10 years ago
Subv
ac2de12ed8
HLE/Applets: Give each applet its own block of heap memory, and use that when creating the framebuffer shared memory block.
10 years ago
Subv
d261984f54
Kernel: Account for automatically-allocated shared memories in the amount of used linear heap memory.
10 years ago
Subv
5679d066b5
Kernel/SharedMemory: Log an error when Map fails.
10 years ago
Subv
0fb6d2a247
Kernel: Implemented shared memory permissions.
10 years ago
Subv
f72bd57212
Kernel/Memory: Remove the Shared Memory region from the legacy memory map.
10 years ago
Subv
1bd0cf542f
Kernel/SharedMemory: Properly implemented shared memory support.
Applications can request the kernel to allocate a piece of the linear heap for them when creating a shared memory object.
Shared memory areas are now properly mapped into the target processes when calling svcMapMemoryBlock.
Removed the APT Shared Font hack as it is no longer needed.
10 years ago
Subv
42a50da76b
Kernel/SVC: Fixed the register order for svcCreateMemoryBlock.
R0 is used as the last parameter instead of R4.
10 years ago
Subv
5b7f86708c
Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1).
We do not currently implement any cores other than the AppCore (Core 0).
10 years ago
Subv
d192fb066d
Kernel/Threads: Dynamically allocate the TLS region for threads in the BASE region of the linear heap.
Each thread gets a 0x200-byte area from the 0x1000-sized page, when all 8 thread slots in a single page are used up, the kernel allocates a new page to hold another 8 entries.
This is consistent with what the real kernel does.
10 years ago
MerryMage
a06dcfeb61
Common: Remove Common::make_unique, use std::make_unique
10 years ago
Lioncash
04f8d39a96
session: Make helper functions constexpr
10 years ago
Lioncash
6b7ebb3f82
hle: Get rid of global access to g_reschedule
This shouldn't be directly exposed if there's already a partial API that operates on it.
We can just provide the rest of that API.
10 years ago
Lioncash
856a1d0386
svc: Move ResetType enum to the kernel event header
10 years ago
Lioncash
12e92f17de
svc: Make ResetType an enum class
10 years ago
Yuri Kunde Schlesner
6aa90e13f9
Memory: Do correct Phys->Virt address translation for non-APP linheap
10 years ago
MerryMage
8b00954ec7
AudioCore: Skeleton Implementation
This commit:
* Adds a new subproject, audio_core.
* Defines structures that exist in DSP shared memory.
* Hooks up various other parts of the emulator into audio core.
This sets the foundation for a later HLE DSP implementation.
10 years ago
MerryMage
6c71858c5c
BitField: Make trivially copyable and remove assignment operator
10 years ago
MerryMage
2b93313348
Memory: Implement MMIO
10 years ago
Subv
d90d5a0ee6
HLE/SVC: Implement UnmapMemoryBlock.
This implementation will need to be (almost completely) changed when we implement multiprocess support.
10 years ago
Subv
6cccc36505
HLE/Timers: Reset OneShot timers when they are acquired instead of when they're triggered.
Closes #1139
10 years ago
Subv
29032ce9b6
SVC: Fixed ArbitrateAddress to behave as it does on hardware.
This was verified with hwtests that i plan to upload later on.
10 years ago
Yuri Kunde Schlesner
84a22cb594
Kernel: Implement svcGetSystemInfo
This makes smealum/ctrulib@b96dd51d3349961189d4ab1bc2a5c45deff21c09 work
with Citra.
10 years ago
Rohit Nirmal
32391cffdd
Silence -Wsign-compare warnings.
10 years ago
Lioncash
751fbfdcc3
general: Silence some warnings when using clang
10 years ago
Lioncash
d3efa637b4
General: Fix up doxygen comments
10 years ago