| // Copyright 2020 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. |
| // This specific FIDL file is used in two contexts: |
| // |
| // 1. Define the `zx` library for plain-vanilla FIDL files, i.e. channel |
| // transport |
| // 2. Part of the overall definition of the Kernel ABI, i.e. Syscall transport |
| // |
| // Since the FIDL compiler does not support splitting definitions per-transport |
| // yet, we split definitions by file. |
| library zx; |
| |
| // zx_status_t and errors.h. |
| alias Status = int32; |
| |
| // zx_time_t: absolute monotonic time in nanoseconds, from a device-specific |
| // timebase defined here: |
| // https://fuchsia.dev/fuchsia-src/concepts/kernel/time/monotonic.md |
| alias Time = int64; |
| |
| // zx_duration_t: a duration in nanoseconds. |
| alias Duration = int64; |
| |
| // zx_ticks_t: a duration in hardware ticks. |
| alias Ticks = int64; |
| |
| // zx_koid_t: global kernel object id. |
| alias Koid = uint64; |
| |
| // zx_off_t: offset. |
| alias Off = uint64; |
| |
| // TODO(fxbug.dev/51002): These are currently duplicated with zircon/types.h. |
| // Eventually the definitions in zircon/types.h will be generated from this |
| // source. |
| const CHANNEL_MAX_MSG_BYTES uint64 = 65536; |
| const CHANNEL_MAX_MSG_HANDLES uint64 = 64; |
| const MAX_NAME_LEN uint64 = 32; |
| const MAX_CPUS uint64 = 512; |
| |
| type ObjType = strict enum : uint32 { |
| NONE = 0; |
| PROCESS = 1; |
| THREAD = 2; |
| VMO = 3; |
| CHANNEL = 4; |
| EVENT = 5; |
| PORT = 6; |
| INTERRUPT = 9; |
| PCI_DEVICE = 11; |
| LOG = 12; |
| SOCKET = 14; |
| RESOURCE = 15; |
| EVENTPAIR = 16; |
| JOB = 17; |
| VMAR = 18; |
| FIFO = 19; |
| GUEST = 20; |
| VCPU = 21; |
| TIMER = 22; |
| IOMMU = 23; |
| BTI = 24; |
| PROFILE = 25; |
| PMT = 26; |
| SUSPEND_TOKEN = 27; |
| PAGER = 28; |
| EXCEPTION = 29; |
| CLOCK = 30; |
| STREAM = 31; |
| MSI = 32; |
| }; |
| |
| resource_definition Handle : uint32 { |
| properties { |
| subtype ObjType; |
| rights Rights; |
| }; |
| }; |