| // Copyright 2023 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| #include <lib/driver/compat/cpp/banjo_client.h> | |
| namespace compat::internal { | |
| uint64_t GetKoid() { | |
| static uint64_t process_koid = []() { | |
| zx_info_handle_basic_t basic; | |
| ZX_ASSERT(zx::process::self()->get_info(ZX_INFO_HANDLE_BASIC, &basic, sizeof(basic), nullptr, | |
| nullptr) == ZX_OK); | |
| return basic.koid; | |
| }(); | |
| return process_koid; | |
| } | |
| } // namespace compat::internal |