diff options
author | Lukas Larsson <[email protected]> | 2015-12-10 10:58:33 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-03-29 14:56:35 +0200 |
commit | 4a736966eba5398a22697db6ca67e1e3dd3cd0f2 (patch) | |
tree | fd94b504ca0f28abdebcedeea72018610a561a00 /erts/emulator/beam/erl_bif_unique.c | |
parent | cee5b753e8dbd294b2677f684c404d16dcfcd643 (diff) | |
download | otp-4a736966eba5398a22697db6ca67e1e3dd3cd0f2.tar.gz otp-4a736966eba5398a22697db6ca67e1e3dd3cd0f2.tar.bz2 otp-4a736966eba5398a22697db6ca67e1e3dd3cd0f2.zip |
erts: Add enif_cpu/now_time and enif_make_unique_integer
Diffstat (limited to 'erts/emulator/beam/erl_bif_unique.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_unique.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/erts/emulator/beam/erl_bif_unique.c b/erts/emulator/beam/erl_bif_unique.c index c4a39b8897..c9c8561f64 100644 --- a/erts/emulator/beam/erl_bif_unique.c +++ b/erts/emulator/beam/erl_bif_unique.c @@ -266,17 +266,19 @@ static ERTS_INLINE Eterm unique_integer_bif(Process *c_p, int positive) } Uint -erts_raw_unique_integer_heap_size(Uint64 val[ERTS_UNIQUE_INT_RAW_VALUES]) +erts_raw_unique_integer_heap_size(Uint64 val[ERTS_UNIQUE_INT_RAW_VALUES], + int positive) { Uint sz; - bld_unique_integer_term(NULL, &sz, val[0], val[1], 0); + bld_unique_integer_term(NULL, &sz, val[0], val[1], positive); return sz; } Eterm -erts_raw_make_unique_integer(Eterm **hpp, Uint64 val[ERTS_UNIQUE_INT_RAW_VALUES]) +erts_raw_make_unique_integer(Eterm **hpp, Uint64 val[ERTS_UNIQUE_INT_RAW_VALUES], + int positive) { - return bld_unique_integer_term(hpp, NULL, val[0], val[1], 0); + return bld_unique_integer_term(hpp, NULL, val[0], val[1], positive); } void @@ -426,16 +428,16 @@ erts_raw_get_unique_monotonic_integer(void) } Uint -erts_raw_unique_monotonic_integer_heap_size(Sint64 raw) +erts_raw_unique_monotonic_integer_heap_size(Sint64 raw, int positive) { - return get_unique_monotonic_integer_heap_size(raw, 0); + return get_unique_monotonic_integer_heap_size(raw, positive); } Eterm -erts_raw_make_unique_monotonic_integer_value(Eterm **hpp, Sint64 raw) +erts_raw_make_unique_monotonic_integer_value(Eterm **hpp, Sint64 raw, int positive) { - Uint hsz = get_unique_monotonic_integer_heap_size(raw, 0); - Eterm res = make_unique_monotonic_integer_value(*hpp, hsz, raw, 0); + Uint hsz = get_unique_monotonic_integer_heap_size(raw, positive); + Eterm res = make_unique_monotonic_integer_value(*hpp, hsz, raw, positive); *hpp += hsz; return res; } |