mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
queue: fix atomic_store_explicit different implementation on arm
This commit is contained in:
parent
4107564ecc
commit
410a7bedbc
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue