mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
lua-bson atomic #1317
This commit is contained in:
@@ -1245,11 +1245,11 @@ typeclosure(lua_State *L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t oid_header[5];
|
static uint8_t oid_header[5];
|
||||||
static uint32_t oid_counter;
|
static ATOM_ULONG oid_counter;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_oid_header() {
|
init_oid_header() {
|
||||||
if (oid_counter) {
|
if (ATOM_LOAD(&oid_counter)) {
|
||||||
// already init
|
// already init
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1273,7 +1273,7 @@ init_oid_header() {
|
|||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
c = 1;
|
c = 1;
|
||||||
}
|
}
|
||||||
oid_counter = c;
|
ATOM_STORE(&oid_counter, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
|||||||
Reference in New Issue
Block a user