Adam Barth | 57eacf5 | 2020-11-04 00:38:09 +0000 | [diff] [blame] | 1 | // Copyright 2016 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/thread.h> |
| 6 | |
| 7 | #include <zircon/syscalls.h> |
| 8 | |
| 9 | #include <lib/zx/process.h> |
| 10 | |
| 11 | namespace zx { |
| 12 | |
| 13 | zx_status_t thread::create(const process& process, const char* name, uint32_t name_len, |
| 14 | uint32_t flags, thread* result) { |
| 15 | // Assume |result| and |process| must refer to different containers, due |
| 16 | // to strict aliasing. |
| 17 | return zx_thread_create(process.get(), name, name_len, flags, result->reset_and_get_address()); |
| 18 | } |
| 19 | |
| 20 | } // namespace zx |