aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-12-16 12:10:23 +0100
committerRickard Green <[email protected]>2010-12-16 12:12:25 +0100
commit46d9d4c36e1a9d52256b49d6fe6e519fc54a0f6e (patch)
treea854e8b80841980e600f3b3497717254c6e107b9 /erts/emulator/beam/erl_db_util.h
parent8b18824e2b13e60fb1a067f80dbb228172f6a3d2 (diff)
downloadotp-46d9d4c36e1a9d52256b49d6fe6e519fc54a0f6e.tar.gz
otp-46d9d4c36e1a9d52256b49d6fe6e519fc54a0f6e.tar.bz2
otp-46d9d4c36e1a9d52256b49d6fe6e519fc54a0f6e.zip
Stop using reference counter when write accessing ETS-tables
Diffstat (limited to 'erts/emulator/beam/erl_db_util.h')
-rw-r--r--erts/emulator/beam/erl_db_util.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_db_util.h b/erts/emulator/beam/erl_db_util.h
index 10ba755e80..58ad39d772 100644
--- a/erts/emulator/beam/erl_db_util.h
+++ b/erts/emulator/beam/erl_db_util.h
@@ -206,8 +206,7 @@ typedef struct db_fixation {
*/
typedef struct db_table_common {
- erts_refc_t ref;
- erts_refc_t fixref; /* fixation counter */
+ erts_refc_t ref; /* fixation counter and delete counter */
#ifdef ERTS_SMP
erts_smp_rwmtx_t rwlock; /* rw lock on table */
erts_smp_mtx_t fixlock; /* Protects fixations,megasec,sec,microsec */
@@ -253,7 +252,7 @@ typedef struct db_table_common {
(DB_BAG | DB_SET | DB_DUPLICATE_BAG)))
#define IS_TREE_TABLE(Status) (!!((Status) & \
DB_ORDERED_SET))
-#define NFIXED(T) (erts_refc_read(&(T)->common.fixref,0))
+#define NFIXED(T) (erts_refc_read(&(T)->common.ref,0))
#define IS_FIXED(T) (NFIXED(T) != 0)
Eterm erts_ets_copy_object(Eterm, Process*);