aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_time.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-05-08 17:45:01 +0200
committerRickard Green <[email protected]>2015-05-08 17:45:01 +0200
commit207346e0543143bf1aea11a93bcb24de170fc0ac (patch)
tree6792897b3d88f175605f216edc4780c54fe98edb /erts/emulator/beam/erl_time.h
parentfad4130bd8844097b6406ddc587b2185de1937fe (diff)
parent6b5905e49c74c4034b55824ce4d1a62455f670bc (diff)
downloadotp-207346e0543143bf1aea11a93bcb24de170fc0ac.tar.gz
otp-207346e0543143bf1aea11a93bcb24de170fc0ac.tar.bz2
otp-207346e0543143bf1aea11a93bcb24de170fc0ac.zip
Merge branch 'rickard/time-improvement/OTP-11997'
* rickard/time-improvement/OTP-11997: Allow execution of estone suite on pre OTP-18 systems Add parallel time monotonicity test-case Replace usage of erlang:now() in line-tracing Replace erlang:now() usage in emulator suite Replace erlang:now() usage in system suite Misc time improvements
Diffstat (limited to 'erts/emulator/beam/erl_time.h')
-rw-r--r--erts/emulator/beam/erl_time.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_time.h b/erts/emulator/beam/erl_time.h
index cb7764addc..5af3c21d40 100644
--- a/erts/emulator/beam/erl_time.h
+++ b/erts/emulator/beam/erl_time.h
@@ -26,6 +26,12 @@
#define ERTS_TIME_ASSERT(B) ((void) 1)
#endif
+typedef enum {
+ ERTS_NO_TIME_WARP_MODE,
+ ERTS_SINGLE_TIME_WARP_MODE,
+ ERTS_MULTI_TIME_WARP_MODE
+} ErtsTimeWarpMode;
+
typedef struct ErtsTimerWheel_ ErtsTimerWheel;
typedef erts_atomic64_t * ErtsNextTimeoutRef;
extern ErtsTimerWheel *erts_default_timer_wheel;
@@ -38,7 +44,6 @@ extern SysTimeval erts_first_emu_time;
typedef struct erl_timer {
struct erl_timer* next; /* next entry tiw slot or chain */
struct erl_timer* prev; /* prev entry tiw slot or chain */
- Uint slot; /* slot in timer wheel */
erts_smp_atomic_t wheel;
ErtsMonotonicTime timeout_pos; /* Timeout in absolute clock ticks */
/* called when timeout */
@@ -46,6 +51,7 @@ typedef struct erl_timer {
/* called when cancel (may be NULL) */
void (*cancel)(void*);
void* arg; /* argument to timeout/cancel procs */
+ int slot; /* slot in timer wheel */
} ErlTimer;
typedef void (*ErlTimeoutProc)(void*);
@@ -77,6 +83,7 @@ void erts_cancel_smp_ptimer(ErtsSmpPTimer *ptimer);
void erts_monitor_time_offset(Eterm id, Eterm ref);
int erts_demonitor_time_offset(Eterm ref);
+int erts_init_time_sup(int, ErtsTimeWarpMode);
void erts_late_init_time_sup(void);
/* timer-wheel api */