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

@ -22,7 +22,7 @@
namespace Kernel {
ResultVal<bool> Thread::WaitSynchronization(unsigned index) {
ResultVal<bool> Thread::Wait(unsigned index) {
const bool wait = status != THREADSTATUS_DORMANT;
if (wait) {
AddWaitingThread(GetCurrentThread());
@ -32,6 +32,10 @@ ResultVal<bool> Thread::WaitSynchronization(unsigned index) {
return MakeResult<bool>(wait);
}
ResultVal<bool> Thread::Acquire() {
return MakeResult<bool>(true);
}
// Lists all thread ids that aren't deleted/etc.
static std::vector<SharedPtr<Thread>> thread_list;