forked from free1139/ziron
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent_dispatcher.cpp
More file actions
28 lines (21 loc) · 786 Bytes
/
event_dispatcher.cpp
File metadata and controls
28 lines (21 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2016 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <object/event_dispatcher.h>
#include <err.h>
#include <zircon/rights.h>
#include <fbl/alloc_checker.h>
zx_status_t EventDispatcher::Create(uint32_t options, fbl::RefPtr<Dispatcher>* dispatcher,
zx_rights_t* rights) {
fbl::AllocChecker ac;
auto disp = new (&ac) EventDispatcher(options);
if (!ac.check())
return ZX_ERR_NO_MEMORY;
*rights = default_rights();
*dispatcher = fbl::AdoptRef<Dispatcher>(disp);
return ZX_OK;
}
EventDispatcher::EventDispatcher(uint32_t options) {}
EventDispatcher::~EventDispatcher() {}