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 11namespace zx { 12 13zx_status_t thread::create(const process& process, const char* name, 14 uint32_t name_len, 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( 18 process.get(), name, name_len, flags, result->reset_and_get_address()); 19} 20 21} // namespace zx 22