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

Merge branch 'arm-fixes' into develop

This commit is contained in:
Steffen Vogel 2019-04-10 10:29:29 +02:00
commit b8baa79d3a
2 changed files with 6 additions and 1 deletions

View file

@ -91,8 +91,8 @@ int memory_lock(size_t lock)
debug(LOG_MEM | 2, "Increased ressource limit of locked memory to %zd bytes", lock);
}
#endif /* __arm__ */
out:
#endif /* __arm__ */
#ifdef _POSIX_MEMLOCK
/* Lock all current and future memory allocations */
ret = mlockall(MCL_CURRENT | MCL_FUTURE);

View file

@ -57,9 +57,14 @@ int queue_init(struct queue *q, size_t size, struct memory_type *m)
for (size_t i = 0; i != size; i += 1)
std::atomic_store_explicit(&buffer[i].sequence, i, std::memory_order_relaxed);
#ifndef __arm__
std::atomic_store_explicit(&q->tail, 0ul, std::memory_order_relaxed);
std::atomic_store_explicit(&q->head, 0ul, std::memory_order_relaxed);
#else
std::atomic_store_explicit(&q->tail, 0u, std::memory_order_relaxed);
std::atomic_store_explicit(&q->head, 0u, std::memory_order_relaxed);
#endif
q->state = STATE_INITIALIZED;
return 0;