blob: 9856c041ff1f57fab54708c77f1b8bea9f027e5d [file] [log] [blame]
Adam Barth57eacf52020-11-04 00:38:09 +00001// 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
11namespace zx {
12
13zx_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