bunnei
e26fbfd1d7
core: Replace "AppCore" nomenclature with just "CPU".
9 years ago
bunnei
4fc8b8229e
core: Remove HLE module, consolidate code & various cleanups.
9 years ago
bunnei
232ef55c1a
core: Consolidate core and system state, remove system module & cleanups.
9 years ago
wwylele
5728e42634
Thread: remove the thread from the thread list when exiting
9 years ago
Subv
406907d570
Properly remove a thread from its wait_objects' waitlist when it is awoken by a timeout.
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
Ricardo de Almeida Gonzaga
13d46f6820
Fix typos
9 years ago
wwylele
f69a543110
implement wait tree widget
9 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
Yuri Kunde Schlesner
de79b6fc48
Merge pull request #1869 from wwylele/dont-be-lazy
...
Switch context to the same thread if necessary
9 years ago
wwylele
7d56e88369
Thread: update timeout when rerunning WaitSynch
9 years ago
wwylele
81d3462a19
Switch context on the same thread if necessary
9 years ago
MerryMage
1ebaaf9bb1
Kernel/Thread: Remove use of Memory::GetPointer
9 years ago
Jannik Vogel
af37dd0d52
Set fpscr for new threads
9 years ago
bunnei
0d8bd3ba36
Merge pull request #1695 from Subv/tls_alloc
...
Kernel/Threads: Dynamically allocate the TLS region for threads.
9 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.
9 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.
9 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@b96dd51d33 work
with Citra.
10 years ago
Rohit Nirmal
32391cffdd
Silence -Wsign-compare warnings.
10 years ago
Yuri Kunde Schlesner
14eca982f4
Kernel: Implement svcGetProcessInfo in a basic way
...
This also adds some basic memory usage accounting. These two types are
used by Super Smash Bros. during startup.
10 years ago
Lioncash
dfb424b6d1
dyncom: Rename armdefs.h to armstate.h
10 years ago
Subv
275aaeef9c
Kernel/Scheduling: Clean up a thread's wait_objects when its scheduled.
...
They'll be reset if needed during the next svcWaitSynchronization call (if there's any pending)
10 years ago
Yuri Kunde Schlesner
dc39d06950
Ensure all kernel objects are released during shutdown
...
This commit fixes several kernel object leaks. The most severe of them
was threads not being removed from the private handle table used for
CoreTiming events. This resulted in Threads never being released, which
in turn held references to Process, causing CodeSets to never be freed
when loading other applications.
10 years ago
bunnei
71e8822d23
kernel: Fix svcWaitSynch to always acquire requested wait objects.
10 years ago
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
10 years ago
bunnei
0b7d2941cf
Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.
10 years ago
Yuri Kunde Schlesner
7ada357b2d
Memmap: Re-organize memory function in two files
...
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
10 years ago
Lioncash
207087c856
thread: Fix a conditional check in Reschedule
10 years ago
bunnei
cb2b2071a8
Merge pull request #748 from Subv/tls_max
...
Core/Memory: Add TLS support for creating up to 300 threads
10 years ago
bunnei
ee8da4c356
Merge pull request #751 from yuriks/idle-thread
...
Thread: Remove the idle thread
10 years ago
bunnei
6e26d063a5
Merge pull request #757 from Subv/scheduling
...
Core/Scheduling: Prepare the new priority in the thread queue when svcSetPriority is called
10 years ago
Yuri Kunde Schlesner
4f7a055081
Thread: Remove the idle thread
...
Instead just use nullptr to represent no thread is active.
10 years ago
Subv
dda94e56dd
Core/Memory: Add TLS support for creating up to 300 threads
10 years ago
Yuri Kunde Schlesner
820b97787c
Merge pull request #750 from Subv/process_svc
...
Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread
10 years ago
Subv
dbc1320923
Core/Scheduling: Prepare the new priority in the thread queue when svcSetPriority is called
10 years ago
Subv
41f74a16fd
Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread
10 years ago
Yuri Kunde Schlesner
d16c2bd956
Thread: Correctly set main thread initial stack position
10 years ago
Subv
115ad8e16a
fixup! Set the TLS address in the scheduler
10 years ago
Subv
000876858d
Core/Memory: Give every emulated thread it's own TLS area.
...
The TLS area for thread T with id Ti is located at TLS_AREA_VADDR + (Ti - 1) * 0x200.
This allows some games like Mario Kart 7 to continue further.
10 years ago
Yuri Kunde Schlesner
1c0b87edc2
Memory: Re-organize and rename memory area address constants
10 years ago
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
10 years ago
bunnei
c7dc799e19
Kernel: Properly initialize and shutdown all modules.
10 years ago
bunnei
9c3419ebcc
Kernel: Implemented priority inheritance for mutexes.
10 years ago
bunnei
7b9f428b23
Thread: Implement priority boost for starved threads.
...
SVC: Return correct error code on invalid CreateThread processor ID.
SVC: Assert when creating a thread with an invalid userland priority.
10 years ago
archshift
4fb75d220a
Misc cleanup of common and related functions
10 years ago