diff options
author | Lukas Larsson <[email protected]> | 2016-03-29 14:57:29 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-03-29 14:57:29 +0200 |
commit | 3f190b62031783ad4fc9bb1fb91703a1b1b40ad7 (patch) | |
tree | 7b1a00e113b4350c373bc7f4f58daaf5032c947a /erts/emulator/beam/erl_bif_unique.c | |
parent | 96a0a707c6a7ba7ce9d6668705ca10c66666a8c3 (diff) | |
parent | ed81bb9ed8114d2059783e2c2fdae526d3a36e1e (diff) | |
download | otp-3f190b62031783ad4fc9bb1fb91703a1b1b40ad7.tar.gz otp-3f190b62031783ad4fc9bb1fb91703a1b1b40ad7.tar.bz2 otp-3f190b62031783ad4fc9bb1fb91703a1b1b40ad7.zip |
Merge branch 'lukas/erts/enif_trace_functions/OTP-13442'
* lukas/erts/enif_trace_functions/OTP-13442:
erts: Fix bug in enif_send
erts: Fix windows nif port tests
erts: Fix bug in enif_term_to_binary
erts: Remove printout when dec_term fails in DEBUG
erts: Polish erl_nif docs
erts: Improve enif_binary_to_term
erts: Add enif_port_command
erts: Add enif_term_to_binary and enif_binary_to_term
erts: Add enif_is_process/port_alive
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; } |