blob: f11d9d549e2eb9b78c581cc9f585c1e9a1e1f0fe [file] [log] [blame]
// Copyright 2019 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.
library zx;
// This file is copies of some syscalls that were interesting for the kernel
// header generator.
alias mutable_vector_void = vector<handle>;
alias optional_uint32 = uint32;
alias vector_handle_u32size = vector<byte>;
alias vector_paddr = vector<paddr>;
alias vector_void_u32size = vector<byte>;
[Transport="Syscall"]
protocol KernelCases {
// Output vector to out_ptr, and vector<paddr> staying zx_paddr_t (not
// turning into uint64).
BtiPin(handle:BTI handle,
uint32 options,
handle:VMO vmo,
uint64 offset,
uint64 size) ->
(status status, vector_paddr addrs, handle:PMT pmt);
// Still have NORETURN markup for kernel (but only this one).
[noreturn]
ThreadExit();
// inout_ptr.
MtraceControl(handle:RESOURCE handle,
uint32 kind,
uint32 action,
uint32 options,
mutable_vector_void ptr) ->
(status status);
// vector of handles isn't turned into user_out_handle*, rather stays as
// user_out_ptr<zx_handle_t>, because it's not just one.
Read(handle:CHANNEL handle,
uint32 options) ->
(status status,
vector_void_u32size bytes,
vector_handle_u32size handles,
optional_uint32 actual_bytes,
optional_uint32 actual_handles);
[testonly]
compiled_out_in_non_test(int32 a, int32 b) -> (status status);
};