Yuri Kunde Schlesner
396a8d91a4
Manually tweak source formatting and then re-run clang-format
10 years ago
Emmanuel Gil Peyrot
dc8479928c
Sources: Run clang-format on everything.
10 years ago
bunnei
71e8822d23
kernel: Fix svcWaitSynch to always acquire requested wait objects.
12 years ago
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
12 years ago
bunnei
0b7d2941cf
Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.
12 years ago
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
12 years ago
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
12 years ago
Yuri Kunde Schlesner
88a4a808c6
Kernel: Stop creating useless Handles during object creation
They're finally unnecessary, and will stop cluttering the application's
handle table.
12 years ago
Yuri Kunde Schlesner
7725256f64
Explicitly instantiate constructors/destructors for Kernel objects
This should speed up compile times a bit, as well as enable more liberal
use of forward declarations. (Due to SharedPtr not trying to emit the
destructor anymore.)
12 years ago
Yuri Kunde Schlesner
d9b19be1d9
Kernel: Convert Semaphore to not use Handles
12 years ago
bunnei
f09806aed2
Kernel: Renamed some functions for clarity.
- ReleaseNextThread->WakeupNextThread
- ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
12 years ago
bunnei
15b6a4d9ad
Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.
12 years ago
bunnei
c68eb15695
WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.
12 years ago
bunnei
e5a9f1c644
Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.
12 years ago
bunnei
6643673f28
WaitSynchronizationN: Refactor to fix several bugs
- Separate wait checking from waiting the current thread
- Resume thread when wait_all=true only if all objects are available at once
- Set output to correct wait object index when there are duplicate handles
12 years ago
bunnei
aa01c57ae9
Kernel: Separate WaitSynchronization into Wait and Acquire methods.
12 years ago
bunnei
7faf2d8e06
WaitSynchronizationN: Implement return values
12 years ago
bunnei
c22bac6398
Kernel: Added WaitObject and changed "waitable" objects inherit from it.
12 years ago
Yuri Kunde Schlesner
8ad41775cc
Kernel: Start using boost::intrusive_ptr for lifetime management
12 years ago
Yuri Kunde Schlesner
9bf8462b96
Thread: Reduce use of Handles and move some funcs to inside the class.
12 years ago
Yuri Kunde Schlesner
7e2903cb74
Kernel: New handle manager
This handle manager more closely mirrors the behaviour of the CTR-OS
one. In addition object ref-counts and support for DuplicateHandle have
been added.
Note that support for DuplicateHandle is still experimental, since parts
of the kernel still use Handles internally, which will likely cause
troubles if two different handles to the same object are used to e.g.
wait on a synchronization primitive.
12 years ago
Yuri Kunde Schlesner
23f2142009
Kernel: Replace GetStaticHandleType by HANDLE_TYPE constants
12 years ago
Yuri Kunde Schlesner
73fba22c01
Rename ObjectPool to HandleTable
12 years ago
purpasmart96
ebfd831ccb
License change
12 years ago
Chin
e795692614
Clean up some warnings
12 years ago
Subv
ea95876431
Kernel/Semaphore: Small style change
12 years ago
Subv
effb181888
Kernel/Semaphores: Invert the available count checking.
Same semantics, idea by @yuriks
12 years ago
Subv
5e25986235
Kernel/Semaphores: Addressed some issues.
12 years ago
Subv
cc81a510e3
Semaphore: Removed an unneeded function
12 years ago
Subv
61434651d8
Semaphores: Addressed some style issues
12 years ago
Subv
abff4a7ee2
Semaphore: Implemented the initial_count parameter.
12 years ago
Subv
49b31badba
SVC: Implemented ReleaseSemaphore.
This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has
12 years ago
Subv
82c84883a5
SVC: Implemented svcCreateSemaphore
ToDo: Implement svcReleaseSemaphore
* Some testing against hardware needed
12 years ago