diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2020-02-10 15:20:33 +0200 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2020-04-07 14:14:12 +0300 |
commit | 58e145acd55fc7a8f63c506e857d3fe8b311c422 (patch) | |
tree | 83c5762c8e8863295f4a8fe4bc2f6467da21482a /platform/linux-generic/include-abi | |
parent | 7b25b58be4ecf706a88893a0de9b3f7bfe4d12d5 (diff) |
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 <petri.savolainen@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'platform/linux-generic/include-abi')
-rw-r--r-- | platform/linux-generic/include-abi/odp/api/abi/stash.h | 38 |
1 files changed, 38 insertions, 0 deletions
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 <odp/api/plat/strong_types.h> + +/** @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 |