1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

use off_t for all relative pointers

This commit is contained in:
Georg Reinke 2017-04-06 10:20:06 +02:00
parent 66545fc4c7
commit 2032342859
3 changed files with 5 additions and 4 deletions

View file

@ -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 */

View file

@ -36,6 +36,7 @@
#include <stdint.h>
#include <stdatomic.h>
#include <unistd.h>
#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 */

View file

@ -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 */