diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-10-02 21:43:01 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-10-03 14:20:10 -0400 |
commit | ef5b280549607310037f4200f74baaa8329f414a (patch) | |
tree | 71a0a21cfe25fcc41ccdee716753250d2dd64cbd /src/include/txn.i | |
parent | 1bbfcb5f7a33648a156f8f59cedd77cb3f5c05b0 (diff) | |
download | mongo-ef5b280549607310037f4200f74baaa8329f414a.tar.gz |
Add size specific atomics for 1, 4 & 8 byte atomic operations
Diffstat (limited to 'src/include/txn.i')
-rw-r--r-- | src/include/txn.i | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/txn.i b/src/include/txn.i index 81559bfe490..60c4118f4dc 100644 --- a/src/include/txn.i +++ b/src/include/txn.i @@ -208,7 +208,7 @@ __wt_txn_new_id(WT_SESSION_IMPL *session) * global current ID, so we want post-increment semantics. Our atomic * add primitive does pre-increment, so adjust the result here. */ - return WT_ATOMIC_ADD(S2C(session)->txn_global.current, 1) - 1; + return WT_ATOMIC_ADD8(S2C(session)->txn_global.current, 1) - 1; } /* @@ -254,7 +254,7 @@ __wt_txn_id_check(WT_SESSION_IMPL *session) */ do { txn_state->id = txn->id = txn_global->current; - } while (!WT_ATOMIC_CAS( + } while (!WT_ATOMIC_CAS8( txn_global->current, txn->id, txn->id + 1)); /* |