blob: ae3795dcfd299d9f4abdccb92273b7cc582b970b [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;
@transport("Syscall")
protocol fifo {
/// Create a fifo.
/// Rights: Caller job policy must allow ZX_POL_NEW_FIFO.
fifo_create(struct {
elem_count usize;
elem_size usize;
options uint32;
}) -> (resource struct {
status status;
out0 handle:FIFO;
out1 handle:FIFO;
});
/// Read data from a fifo.
/// Rights: handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_READ.
fifo_read(resource struct {
handle handle:FIFO;
elem_size usize;
}) -> (struct {
status status;
data vector_void;
actual_count optional_usize;
});
/// Write data to a fifo.
/// Rights: handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_WRITE.
fifo_write(resource struct {
handle handle:FIFO;
elem_size usize;
data const_voidptr;
count usize;
}) -> (struct {
status status;
actual_count optional_usize;
});
};