Browse Source

MT#55283 add atomic64 size/type assert

Change-Id: Ie68eb9ac05db5afba238936a4b1a4be2bc8adaeb
pull/1993/merge
Richard Fuchs 2 weeks ago
parent
commit
cbf807615a
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      lib/auxlib.h

+ 4
- 0
lib/auxlib.h View File

@ -535,6 +535,10 @@ taint_func(srandom, "use rtpe_ssl_init() instead");
typedef struct {
uint64_t a;
} atomic64;
typedef atomic64 atomic64_t;
static_assert(sizeof(atomic64_t) == sizeof(int64_t), "atomic64_t != int64_t");
INLINE uint64_t atomic64_get(const atomic64 *u) {
return __atomic_load_n(&u->a, __ATOMIC_SEQ_CST);


Loading…
Cancel
Save