blob: e2cbffc5043f088722bbfad500b266e4b4fe35a1 [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);
};