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:
Yuri Kunde Schlesner 2015-02-01 00:14:40 -02:00
parent 52f58e64ef
commit 88a4a808c6
18 changed files with 41 additions and 57 deletions

View file

@ -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() {