diff options
author | Rickard Green <[email protected]> | 2011-07-08 13:56:10 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2011-07-08 13:56:10 +0200 |
commit | c6bc815813f57fb7dfffe704c31a4124a0fe755e (patch) | |
tree | 6d142c893ee4e9f800b094bba26537147cf5b2de /erts/emulator/beam/erl_db.h | |
parent | 5c62fdc1914000f3da921c82a82b6dc30783db53 (diff) | |
parent | 0204e80cba378dfc1140a7f98d96705d470bddde (diff) | |
download | otp-c6bc815813f57fb7dfffe704c31a4124a0fe755e.tar.gz otp-c6bc815813f57fb7dfffe704c31a4124a0fe755e.tar.bz2 otp-c6bc815813f57fb7dfffe704c31a4124a0fe755e.zip |
Merge branch 'rickard/atomics-api/OTP-9014' into major
* rickard/atomics-api/OTP-9014:
Use new atomic API in runtime system
Improve ethread atomics
Diffstat (limited to 'erts/emulator/beam/erl_db.h')
-rw-r--r-- | erts/emulator/beam/erl_db.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_db.h b/erts/emulator/beam/erl_db.h index e0bdebcb01..2e5deaf338 100644 --- a/erts/emulator/beam/erl_db.h +++ b/erts/emulator/beam/erl_db.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1996-2010. All Rights Reserved. + * Copyright Ericsson AB 1996-2011. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -86,11 +86,11 @@ do { \ erts_aint_t sz__ = (((erts_aint_t) (ALLOC_SZ)) \ - ((erts_aint_t) (FREE_SZ))); \ ASSERT((TAB)); \ - erts_smp_atomic_add(&(TAB)->common.memory_size, sz__); \ + erts_smp_atomic_add_nob(&(TAB)->common.memory_size, sz__); \ } while (0) #define ERTS_ETS_MISC_MEM_ADD(SZ) \ - erts_smp_atomic_add(&erts_ets_misc_mem_size, (SZ)); + erts_smp_atomic_add_nob(&erts_ets_misc_mem_size, (SZ)); ERTS_GLB_INLINE void *erts_db_alloc(ErtsAlcType_t type, DbTable *tab, @@ -227,7 +227,7 @@ erts_db_free(ErtsAlcType_t type, DbTable *tab, void *ptr, Uint size) ERTS_DB_ALC_MEM_UPDATE_(tab, size, 0); ASSERT(((void *) tab) != ptr - || erts_smp_atomic_read(&tab->common.memory_size) == 0); + || erts_smp_atomic_read_nob(&tab->common.memory_size) == 0); erts_free(type, ptr); } |