aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-01-13 18:33:42 +0100
committerRickard Green <[email protected]>2016-01-20 11:10:37 +0100
commitdc8e62f33ad0ca7a772ec74d67b6d3e157f639b4 (patch)
treedfb9c44328ba358c34678d557941a13b79e3d281 /erts/emulator/beam/erl_db_util.h
parent858c6f7fa44f7b2dc363b359198d6522dd60e914 (diff)
downloadotp-dc8e62f33ad0ca7a772ec74d67b6d3e157f639b4.tar.gz
otp-dc8e62f33ad0ca7a772ec74d67b6d3e157f639b4.tar.bz2
otp-dc8e62f33ad0ca7a772ec74d67b6d3e157f639b4.zip
Introduce time warp safe replacement for safe_fixed option
The new time warp safe option is safe_fixed_monotonic_time which gives erlang:monotonic_time(). The safe_fixed option was also slightly changed. It now gives erlang:timestamp() instead of erlang:now(). This has however not been documented, so it is considered a compatible change. The above effects both ets, and dets. This commit also include the bugfix OTP-13239 for dets:info(Tab, safe_fixed). The timestamp in the result returned by dets:info(Tab, safe_fixed) was unintentionally broken as a result of the time API rewrites in OTP 18.0.
Diffstat (limited to 'erts/emulator/beam/erl_db_util.h')
-rw-r--r--erts/emulator/beam/erl_db_util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_db_util.h b/erts/emulator/beam/erl_db_util.h
index 1ccdc0305b..0903a40460 100644
--- a/erts/emulator/beam/erl_db_util.h
+++ b/erts/emulator/beam/erl_db_util.h
@@ -229,7 +229,10 @@ typedef struct db_table_common {
DbTableMethod* meth; /* table methods */
erts_smp_atomic_t nitems; /* Total number of items in table */
erts_smp_atomic_t memory_size;/* Total memory size. NOTE: in bytes! */
- Uint megasec,sec,microsec; /* Last fixation time */
+ struct { /* Last fixation time */
+ ErtsMonotonicTime monotonic;
+ ErtsMonotonicTime offset;
+ } time;
DbFixation* fixations; /* List of processes who have done safe_fixtable,
"local" fixations not included. */
/* All 32-bit fields */