Adam Barth | 57eacf5 | 2020-11-04 00:38:09 +0000 | [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/guest.h> |
| 6 | |
| 7 | #include <zircon/syscalls.h> |
| 8 | |
| 9 | #include <lib/zx/vmar.h> |
| 10 | |
| 11 | namespace zx { |
| 12 | |
| 13 | zx_status_t guest::create(const resource& resource, uint32_t options, guest* guest, vmar* vmar) { |
| 14 | // Assume |resource|, |guest| and |vmar| must refer to different containers, |
| 15 | // due to strict aliasing. |
| 16 | return zx_guest_create(resource.get(), options, guest->reset_and_get_address(), |
| 17 | vmar->reset_and_get_address()); |
| 18 | } |
| 19 | |
| 20 | } // namespace zx |