Kernel: Separate WaitSynchronization into Wait and Acquire methods.
This commit is contained in:
parent
627e96fc15
commit
aa01c57ae9
8 changed files with 59 additions and 18 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue