Kernel: Stop creating useless Handles during object creation
They're finally unnecessary, and will stop cluttering the application's handle table.
This commit is contained in:
parent
52f58e64ef
commit
88a4a808c6
18 changed files with 41 additions and 57 deletions
|
@ -17,16 +17,14 @@ namespace Kernel {
|
|||
Event::Event() {}
|
||||
Event::~Event() {}
|
||||
|
||||
ResultVal<SharedPtr<Event>> Event::Create(ResetType reset_type, std::string name) {
|
||||
SharedPtr<Event> Event::Create(ResetType reset_type, std::string name) {
|
||||
SharedPtr<Event> evt(new Event);
|
||||
// TOOD(yuriks): Don't create Handle (see Thread::Create())
|
||||
CASCADE_RESULT(auto unused, Kernel::g_handle_table.Create(evt));
|
||||
|
||||
evt->signaled = false;
|
||||
evt->reset_type = evt->intitial_reset_type = reset_type;
|
||||
evt->name = std::move(name);
|
||||
|
||||
return MakeResult<SharedPtr<Event>>(evt);
|
||||
return evt;
|
||||
}
|
||||
|
||||
bool Event::ShouldWait() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue