mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +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 uint32_t oid_counter;
|
||||
static ATOM_ULONG oid_counter;
|
||||
|
||||
static void
|
||||
init_oid_header() {
|
||||
if (oid_counter) {
|
||||
if (ATOM_LOAD(&oid_counter)) {
|
||||
// already init
|
||||
return;
|
||||
}
|
||||
@@ -1273,7 +1273,7 @@ init_oid_header() {
|
||||
if (c == 0) {
|
||||
c = 1;
|
||||
}
|
||||
oid_counter = c;
|
||||
ATOM_STORE(&oid_counter, c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
||||
Reference in New Issue
Block a user