forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkoid.h
26 lines (18 loc) · 791 Bytes
/
koid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_FUCHSIA_KOID_H_
#define BASE_FUCHSIA_KOID_H_
#include <lib/zx/object.h>
#include <zircon/types.h>
#include "base/optional.h"
namespace base {
// Returns the Kernel Object IDentifier for the object referred to by |handle|,
// if it is valid.
BASE_EXPORT base::Optional<zx_koid_t> GetKoid(const zx::object_base& handle);
// Returns the Kernel Object IDentifier for the peer of the paired object (i.e.
// a channel, socket, eventpair, etc) referred to by |handle|.
BASE_EXPORT base::Optional<zx_koid_t> GetRelatedKoid(
const zx::object_base& handle);
} // namespace base
#endif // BASE_FUCHSIA_KOID_H_