Browse Source

Use atomic acquire on load, release on store

pull/5170/head
Martin Kroeker GitHub 11 months ago
parent
commit
3a3318006c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      driver/others/blas_server.c

+ 2
- 2
driver/others/blas_server.c View File

@@ -146,8 +146,8 @@ typedef struct {
} thread_status_t;

#ifdef HAVE_C11
#define atomic_load_queue(p) __atomic_load_n(p, __ATOMIC_ACQ_REL)
#define atomic_store_queue(p, v) __atomic_store_n(p, v, __ATOMIC_ACQ_REL)
#define atomic_load_queue(p) __atomic_load_n(p, __ATOMIC_ACQUIRE)
#define atomic_store_queue(p, v) __atomic_store_n(p, v, __ATOMIC_RELEASE)
#else
#define atomic_load_queue(p) (blas_queue_t*)(*(volatile blas_queue_t**)(p))
#define atomic_store_queue(p, v) (*(volatile blas_queue_t* volatile*)(p) = (v))


Loading…
Cancel
Save