From 2032342859d142622be05f63667e77469beb9ce3 Mon Sep 17 00:00:00 2001 From: Georg Reinke Date: Thu, 6 Apr 2017 10:20:06 +0200 Subject: [PATCH] use off_t for all relative pointers --- include/villas/pool.h | 2 +- include/villas/queue.h | 5 +++-- include/villas/sample.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/villas/pool.h b/include/villas/pool.h index 36221dadc..0ae0f6de6 100644 --- a/include/villas/pool.h +++ b/include/villas/pool.h @@ -17,7 +17,7 @@ /** A thread-safe memory pool */ struct pool { - size_t buffer_off; /**< Offset from the struct address to the underlying memory area */ + off_t buffer_off; /**< Offset from the struct address to the underlying memory area */ struct memtype *mem; size_t len; /**< Length of the underlying memory area */ diff --git a/include/villas/queue.h b/include/villas/queue.h index e13b3feed..4324d6fed 100644 --- a/include/villas/queue.h +++ b/include/villas/queue.h @@ -36,6 +36,7 @@ #include #include +#include #include "memory.h" @@ -44,7 +45,7 @@ typedef char cacheline_pad_t[CACHELINE_SIZE]; struct queue_cell { atomic_size_t sequence; - size_t data_off; /**< Pointer relative to the queue struct */ + off_t data_off; /**< Pointer relative to the queue struct */ }; struct queue { @@ -52,7 +53,7 @@ struct queue { struct memtype * mem; size_t buffer_mask; - size_t buffer_off; /**< Relative pointer to struct queue_cell[] */ + off_t buffer_off; /**< Relative pointer to struct queue_cell[] */ cacheline_pad_t _pad1; /**< Producer area: only producers read & write */ diff --git a/include/villas/sample.h b/include/villas/sample.h index 444507462..41badb8ed 100644 --- a/include/villas/sample.h +++ b/include/villas/sample.h @@ -42,7 +42,7 @@ struct sample { int capacity; /**< The number of values in sample::values for which memory is reserved. */ atomic_int refcnt; /**< Reference counter. */ - uintptr_t pool_off; /**< This sample is belong to this memory pool (relative pointer). */ + off_t pool_off; /**< This sample is belong to this memory pool (relative pointer). */ struct node *source; /**< The node from which this sample originates. */ /** All timestamps are seconds / nano seconds after 1.1.1970 UTC */