From 58e145acd55fc7a8f63c506e857d3fe8b311c422 Mon Sep 17 00:00:00 2001 From: Petri Savolainen Date: Mon, 10 Feb 2020 15:20:33 +0200 Subject: api: stash: add new object stash API Application needs often store object handles for later usage. From current APIs, e.g. buffers and queues could be used to store these handles, but buffers consume more memory than is necessary and event queues are not needed for this simple use case. This new API maybe implemented e.g. as a ring of object handles in memory, or with a HW buffer manager. Signed-off-by: Petri Savolainen Reviewed-by: Stanislaw Kardach Reviewed-by: Matias Elo Reviewed-by: Janne Peltonen --- .../linux-generic/include-abi/odp/api/abi/stash.h | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 platform/linux-generic/include-abi/odp/api/abi/stash.h (limited to 'platform/linux-generic/include-abi') diff --git a/platform/linux-generic/include-abi/odp/api/abi/stash.h b/platform/linux-generic/include-abi/odp/api/abi/stash.h new file mode 100644 index 000000000..36966204f --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/stash.h @@ -0,0 +1,38 @@ +/* Copyright (c) 2020, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + */ + +#ifndef ODP_API_ABI_STASH_H_ +#define ODP_API_ABI_STASH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** @ingroup odp_stash + * @{ + */ + +typedef ODP_HANDLE_T(odp_stash_t); + +#define ODP_STASH_INVALID _odp_cast_scalar(odp_stash_t, 0) + +#define ODP_STASH_NAME_LEN 32 + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.2.3