aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.h
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-03-16 13:18:37 +0100
committerZandra Hird <[email protected]>2015-03-16 13:18:59 +0100
commitda0cfbabbae668bcacbf3e5fff1ebdc173e6f1e1 (patch)
treed970a02c19f9e5c31d600ea5b26ece53142f20e1 /erts/emulator/beam/erl_db_util.h
parent3e2070b328b7c2c5f641f3b73a52d6cb7e3b5a44 (diff)
parent0e464f7be1ae9b54d0fba748ab2dc7bd435ac118 (diff)
downloadotp-da0cfbabbae668bcacbf3e5fff1ebdc173e6f1e1.tar.gz
otp-da0cfbabbae668bcacbf3e5fff1ebdc173e6f1e1.tar.bz2
otp-da0cfbabbae668bcacbf3e5fff1ebdc173e6f1e1.zip
Merge branch 'nox/ets-update_counter-4'
* nox/ets-update_counter-4: Create new BIF ets:update_counter/4 Allow 4-ary BIFs OTP-12563
Diffstat (limited to 'erts/emulator/beam/erl_db_util.h')
-rw-r--r--erts/emulator/beam/erl_db_util.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/erts/emulator/beam/erl_db_util.h b/erts/emulator/beam/erl_db_util.h
index 5ace93c8ed..ca206c7f58 100644
--- a/erts/emulator/beam/erl_db_util.h
+++ b/erts/emulator/beam/erl_db_util.h
@@ -76,6 +76,9 @@ typedef struct db_term {
union db_table;
typedef union db_table DbTable;
+#define DB_MUST_RESIZE 1
+#define DB_NEW_OBJECT 2
+
/* Info about a database entry while it's being updated
* (by update_counter or update_element)
*/
@@ -84,7 +87,7 @@ typedef struct {
DbTerm* dbterm;
void** bp; /* {Hash|Tree}DbTerm** */
Uint new_size;
- int mustResize;
+ int flags;
void* lck;
#if HALFWORD_HEAP
unsigned char* abs_vec; /* [i] true if dbterm->tpl[i] is absolute Eterm */
@@ -183,15 +186,14 @@ typedef struct db_table_method
void *arg);
void (*db_check_table)(DbTable* tb);
- /* Lookup a dbterm for updating. Return false if not found.
- */
- int (*db_lookup_dbterm)(DbTable*, Eterm key,
- DbUpdateHandle* handle); /* [out] */
+ /* Lookup a dbterm for updating. Return false if not found. */
+ int (*db_lookup_dbterm)(Process *, DbTable *, Eterm key, Eterm obj,
+ DbUpdateHandle* handle);
- /* Must be called for each db_lookup_dbterm that returned true,
- ** even if dbterm was not updated.
- */
- void (*db_finalize_dbterm)(DbUpdateHandle* handle);
+ /* Must be called for each db_lookup_dbterm that returned true, even if
+ ** dbterm was not updated. If the handle was of a new object and cret is
+ ** not DB_ERROR_NONE, the object is removed from the table. */
+ void (*db_finalize_dbterm)(int cret, DbUpdateHandle* handle);
} DbTableMethod;