Doug Horn | 1427b6a | 2018-12-11 13:19:16 -0800 | [diff] [blame] | 1 | // Copyright 2018 The Fuchsia Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include <lib/zx/interrupt.h> |
| 6 | |
| 7 | #include <zircon/syscalls.h> |
| 8 | |
| 9 | namespace zx { |
| 10 | |
| 11 | zx_status_t interrupt::create(const resource& resource, uint32_t vector, |
| 12 | uint32_t options, interrupt* result) { |
| 13 | // Assume |result| uses a distinct container from |resource|, due to |
| 14 | // strict aliasing. |
| 15 | return zx_interrupt_create( |
| 16 | resource.get(), vector, options, result->reset_and_get_address()); |
| 17 | } |
| 18 | |
| 19 | } // namespace zx |