1 // Copyright 2016 The Fuchsia Authors
2 //
3 // Use of this source code is governed by a MIT-style
4 // license that can be found in the LICENSE file or at
5 // https://opensource.org/licenses/MIT
6 
7 #include <object/event_dispatcher.h>
8 
9 #include <err.h>
10 
11 #include <zircon/rights.h>
12 #include <fbl/alloc_checker.h>
13 
Create(uint32_t options,fbl::RefPtr<Dispatcher> * dispatcher,zx_rights_t * rights)14 zx_status_t EventDispatcher::Create(uint32_t options, fbl::RefPtr<Dispatcher>* dispatcher,
15                                     zx_rights_t* rights) {
16     fbl::AllocChecker ac;
17     auto disp = new (&ac) EventDispatcher(options);
18     if (!ac.check())
19         return ZX_ERR_NO_MEMORY;
20 
21     *rights = default_rights();
22     *dispatcher = fbl::AdoptRef<Dispatcher>(disp);
23     return ZX_OK;
24 }
25 
EventDispatcher(uint32_t options)26 EventDispatcher::EventDispatcher(uint32_t options) {}
27 
~EventDispatcher()28 EventDispatcher::~EventDispatcher() {}
29