Kernel: Separate WaitSynchronization into Wait and Acquire methods.

This commit is contained in:
bunnei 2015-01-17 22:23:49 -05:00
parent 627e96fc15
commit aa01c57ae9
8 changed files with 59 additions and 18 deletions

View file

@ -28,7 +28,7 @@ public:
bool signaled; ///< Whether the event has already been signaled
std::string name; ///< Name of event (optional)
ResultVal<bool> WaitSynchronization(unsigned index) override {
ResultVal<bool> Wait(unsigned index) override {
bool wait = !signaled;
if (wait) {
AddWaitingThread(GetCurrentThread());
@ -36,6 +36,10 @@ public:
}
return MakeResult<bool>(wait);
}
ResultVal<bool> Acquire() override {
return MakeResult<bool>(true);
}
};
ResultCode SignalEvent(const Handle handle) {