blob: d2969b7fe07f21cc3f4418569ae685d5460f87ab [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.
fifo_create(usize elem_count, usize elem_size, uint32 options)
-> (status status, handle<fifo> out0, handle<fifo> out1);
/// Read data from a fifo.
/// Rights: handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_READ.
fifo_read(handle<fifo> handle, usize elem_size)
-> (status status, vector_void data, optional_usize actual_count);
/// Write data to a fifo.
/// Rights: handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_WRITE.
fifo_write(handle<fifo> handle, usize elem_size, const_voidptr data, usize count)
-> (status status, optional_usize actual_count);
};