diff options
author | Jerin Jacob <jerin.jacob@caviumnetworks.com> | 2015-03-18 19:41:33 +0530 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-03-24 13:00:58 +0300 |
commit | 432f182cab9cd9fa927d9ba146b55bb06eadadde (patch) | |
tree | 1443c1026fcd9a7fca7aaab14abf4bd94464ef58 /platform/linux-generic/include | |
parent | 6623389927c906a8ded99dead56c2ffc09a7cf7b (diff) |
spinlock: allow platform to override odp_spinlock_t
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Bala Manoharan<bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include')
-rw-r--r-- | platform/linux-generic/include/odp/plat/spinlock_types.h | 46 | ||||
-rw-r--r-- | platform/linux-generic/include/odp/spinlock.h | 2 |
2 files changed, 48 insertions, 0 deletions
diff --git a/platform/linux-generic/include/odp/plat/spinlock_types.h b/platform/linux-generic/include/odp/plat/spinlock_types.h new file mode 100644 index 000000000..83d306b5b --- /dev/null +++ b/platform/linux-generic/include/odp/plat/spinlock_types.h @@ -0,0 +1,46 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP spinlock + */ + +#ifndef ODP_SPINLOCK_TYPES_H_ +#define ODP_SPINLOCK_TYPES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp/std_types.h> + +/** + * @internal + * ODP spinlock + */ +struct odp_spinlock_s { + char lock; /**< lock flag, should match odp_atomic_flag_t */ +}; + + +/** @addtogroup odp_synchronizers + * @{ + */ + +typedef struct odp_spinlock_s odp_spinlock_t; + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/include/odp/spinlock.h b/platform/linux-generic/include/odp/spinlock.h index e02df492d..7dbb1c4bf 100644 --- a/platform/linux-generic/include/odp/spinlock.h +++ b/platform/linux-generic/include/odp/spinlock.h @@ -17,6 +17,8 @@ extern "C" { #endif +#include <odp/plat/spinlock_types.h> + /** @ingroup odp_synchronizers * @{ */ |