aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_timer_internal.h
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-22 15:39:22 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-22 16:36:44 +0300
commitecc77c13a9108759d11cdf654279744ef4f5eed1 (patch)
tree890b8382e27826ebbcc802d92d3ac4d3356beeb9 /platform/linux-generic/include/odp_timer_internal.h
parenta5648a126c3d7f71c04af6050a96fa7764ae93d2 (diff)
Revert "linux-generic: timer: use plain buffers for timeouts"
This reverts commit f834609c554c933e6398252817baf59016074447. Patch was wrongly taken from discussion thread. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_timer_internal.h')
-rw-r--r--platform/linux-generic/include/odp_timer_internal.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/platform/linux-generic/include/odp_timer_internal.h b/platform/linux-generic/include/odp_timer_internal.h
index a631bd098..90af62cc8 100644
--- a/platform/linux-generic/include/odp_timer_internal.h
+++ b/platform/linux-generic/include/odp_timer_internal.h
@@ -16,45 +16,36 @@
#include <odp/align.h>
#include <odp/debug.h>
-#include <odp_debug_internal.h>
#include <odp_buffer_internal.h>
#include <odp_pool_internal.h>
#include <odp/timer.h>
/**
* Internal Timeout header
- * For compatibility with buffers, we use the buffer_hdr here and nothing else
*/
typedef struct {
/* common buffer header */
odp_buffer_hdr_t buf_hdr;
-} odp_timeout_fakehdr_t;
-/* The real timeout header is in a separate struct in a separate location */
-typedef struct {
/* Requested expiration time */
uint64_t expiration;
/* User ptr inherited from parent timer */
void *user_ptr;
- /* Handle of buffer we are located in */
- odp_buffer_t buf;
/* Parent timer */
odp_timer_t timer;
} odp_timeout_hdr_t;
typedef struct odp_timeout_hdr_stride {
- uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(odp_timeout_fakehdr_t))];
+ uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(odp_timeout_hdr_t))];
} odp_timeout_hdr_stride;
/**
* Return the timeout header
*/
-static inline odp_timeout_hdr_t *odp_timeout_hdr_from_buf(odp_buffer_t buf)
+static inline odp_timeout_hdr_t *odp_timeout_hdr(odp_buffer_t buf)
{
- /* The real timeout header is stored in the buffer data */
- ODP_ASSERT(odp_buffer_size(buf) == sizeof(odp_timeout_hdr_t));
- return (odp_timeout_hdr_t *)odp_buffer_addr(buf);
+ return (odp_timeout_hdr_t *)odp_buf_to_hdr(buf);
}
#endif