mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00

This patch does following improvements to sbi_fifo: 1. Use valid SBI_Exxxx error codes instead of -1 2. The sbi_fifo_is_full() and sbi_fifo_is_empty() did not acquire qlock before accessing head and tail hence fixed it 3. Added avail member for ease in debugging and simplifying head/tail updates. Due to above changes size of sbi_fifo changes from 48 bytes to 56 bytes. Signed-off-by: Anup Patel <anup.patel@wdc.com>
27 lines
494 B
C
27 lines
494 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2019 Western Digital Corporation or its affiliates.
|
|
*
|
|
* Authors:
|
|
* Anup Patel <anup.patel@wdc.com>
|
|
*/
|
|
|
|
#ifndef __SBI_ERROR_H__
|
|
#define __SBI_ERROR_H__
|
|
|
|
#define SBI_OK 0
|
|
#define SBI_EUNKNOWN -1
|
|
#define SBI_EFAIL -2
|
|
#define SBI_EINVAL -3
|
|
#define SBI_ENOENT -4
|
|
#define SBI_ENOTSUPP -5
|
|
#define SBI_ENODEV -6
|
|
#define SBI_ENOSYS -7
|
|
#define SBI_ETIMEDOUT -8
|
|
#define SBI_EIO -9
|
|
#define SBI_EILL -10
|
|
#define SBI_ENOSPC -11
|
|
|
|
#endif
|