diff --git a/Kernel/WaitHandle.cpp b/Kernel/WaitHandle.cpp index 1354434c..1113872f 100644 --- a/Kernel/WaitHandle.cpp +++ b/Kernel/WaitHandle.cpp @@ -5,6 +5,9 @@ WaitHandle::WaitHandle() { Result = false; + + TaskID = Task::Current().ID; + State = nullptr; } bool WaitHandle::WaitOne(int ms) diff --git a/Kernel/WaitHandle.h b/Kernel/WaitHandle.h index 71b618af..1c27e647 100644 --- a/Kernel/WaitHandle.h +++ b/Kernel/WaitHandle.h @@ -5,6 +5,8 @@ class WaitHandle { public: + uint TaskID; // 句柄所在任务 + void* State; // 用户数据 bool Result; // 结果 WaitHandle();