mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-02 07:50:31 +00:00
redbean: counters are _Atomic
This commit is contained in:
parent
3142758675
commit
58c6f24d9d
1 changed files with 3 additions and 5 deletions
|
@ -182,11 +182,9 @@ __static_yoink("blink_xnu_aarch64"); // is apple silicon
|
||||||
#define HeaderEqualCase(H, S) \
|
#define HeaderEqualCase(H, S) \
|
||||||
SlicesEqualCase(S, strlen(S), HeaderData(H), HeaderLength(H))
|
SlicesEqualCase(S, strlen(S), HeaderData(H), HeaderLength(H))
|
||||||
#define LockInc(P) \
|
#define LockInc(P) \
|
||||||
atomic_fetch_add_explicit((_Atomic(typeof(*(P))) *)(P), +1, \
|
atomic_fetch_add_explicit(P, +1, memory_order_relaxed)
|
||||||
memory_order_relaxed)
|
|
||||||
#define LockDec(P) \
|
#define LockDec(P) \
|
||||||
atomic_fetch_add_explicit((_Atomic(typeof(*(P))) *)(P), -1, \
|
atomic_fetch_add_explicit(P, -1, memory_order_relaxed)
|
||||||
memory_order_relaxed)
|
|
||||||
|
|
||||||
#define TRACE_BEGIN \
|
#define TRACE_BEGIN \
|
||||||
do { \
|
do { \
|
||||||
|
@ -385,7 +383,7 @@ static struct Shared {
|
||||||
struct rusage server;
|
struct rusage server;
|
||||||
struct rusage children;
|
struct rusage children;
|
||||||
struct Counters {
|
struct Counters {
|
||||||
#define C(x) long x;
|
#define C(x) _Atomic(long) x;
|
||||||
#include "tool/net/counters.inc"
|
#include "tool/net/counters.inc"
|
||||||
#undef C
|
#undef C
|
||||||
} c;
|
} c;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue