summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/semaphore.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-01-09kernel: Rename Semaphore to ConditionVariable.bunnei1-64/+0
2018-01-09Kernel: Actually wake up the requested number of threads in Semaphore::Release.Subv1-12/+11
Also properly keep track of data in guest memory, this fixes managing the semaphore from userland. It was found that Semaphores are actually Condition Variables, with Release(1) and Release(-1) being equivalent to notify_one and notify_all. We should change the name of the class to reflect this.
2018-01-07semaphore: More changes for Switch.bunnei1-7/+13
2018-01-06semaphore: Updates for Switch.bunnei1-14/+17
2017-05-25Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner1-4/+3
2017-01-05Kernel/Semaphore: Fixed a regression in semaphore waits.Subv1-1/+2
The regression was caused by a missing check in #2260. The new behavior is consistent with the real kernel.
2017-01-04Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv1-3/+3
This will be useful when implementing mutex priority inheritance.
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-2/+1
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-4/+2
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-3/+5
2015-06-17kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei1-7/+1
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-1/+1
2015-05-21Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.bunnei1-0/+2
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-1/+1
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift1-1/+1
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.
2015-02-02Kernel: Stop creating useless Handles during object creationYuri Kunde Schlesner1-2/+0
They're finally unnecessary, and will stop cluttering the application's handle table.
2015-02-02Explicitly instantiate constructors/destructors for Kernel objectsYuri Kunde Schlesner1-0/+3
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.)
2015-01-30Kernel: Convert Semaphore to not use HandlesYuri Kunde Schlesner1-43/+22
2015-01-22Kernel: Renamed some functions for clarity.bunnei1-1/+1
- ReleaseNextThread->WakeupNextThread - ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
2015-01-22Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.bunnei1-21/+7
2015-01-22WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.bunnei1-1/+1
2015-01-22Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.bunnei1-9/+2
2015-01-22WaitSynchronizationN: Refactor to fix several bugsbunnei1-3/+3
- 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
2015-01-22Kernel: Separate WaitSynchronization into Wait and Acquire methods.bunnei1-3/+12
2015-01-22WaitSynchronizationN: Implement return valuesbunnei1-3/+3
2015-01-22Kernel: Added WaitObject and changed "waitable" objects inherit from it.bunnei1-8/+3
2015-01-09Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner1-2/+2
2015-01-09Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner1-3/+5
2014-12-28Kernel: New handle managerYuri Kunde Schlesner1-1/+2
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.
2014-12-28Kernel: Replace GetStaticHandleType by HANDLE_TYPE constantsYuri Kunde Schlesner1-2/+2
2014-12-28Rename ObjectPool to HandleTableYuri Kunde Schlesner1-2/+2
2014-12-21License changepurpasmart961-1/+1
2014-12-20Clean up some warningsChin1-4/+4
2014-12-13Kernel/Semaphore: Small style changeSubv1-1/+1
2014-12-13Kernel/Semaphores: Invert the available count checking.Subv1-11/+9
Same semantics, idea by @yuriks
2014-12-13Kernel/Semaphores: Addressed some issues.Subv1-28/+13
2014-12-13Semaphore: Removed an unneeded functionSubv1-5/+0
2014-12-13Semaphores: Addressed some style issuesSubv1-6/+5
2014-12-13Semaphore: Implemented the initial_count parameter.Subv1-3/+5
2014-12-13SVC: Implemented ReleaseSemaphore.Subv1-13/+52
This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has
2014-12-13SVC: Implemented svcCreateSemaphoreSubv1-0/+76
ToDo: Implement svcReleaseSemaphore * Some testing against hardware needed