blob: 6b9054b6a8bbaa57eb7b907ba701974dcafb3bde [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.
#ifndef FUCHSIA_INCLUDE_FUCHSIA_COMMUNICATION_H_
#define FUCHSIA_INCLUDE_FUCHSIA_COMMUNICATION_H_
#include <stdint.h>
enum SemaphoreIndices
{
kSemaphoreCompletion,
kSemaphoreMax,
};
enum PayloadVersion
{
kPayloadVersion0 = 0,
};
struct FuchsiaImgCommandPayload
{
// This should be the version number of this payload struct.
uint32_t payload_version;
// The bridge sets this to nonzero when it finishes executing the bridge
// command and modifying the output data.
uint16_t finished_command;
// The bridge sets this to nonzero if the last command succeeded.
uint16_t success;
uint64_t thread_id;
uint32_t bridge_group;
uint32_t function_id;
// Input and output data will immediately follow this struct in the buffer.
// Before the bridge call input data should be stored there, and after the
// bridge call output data will be stored there.
uint32_t in_data_size;
uint32_t out_data_size;
};
#endif // FUCHSIA_INCLUDE_FUCHSIA_COMMUNICATION_H_