From fc0477a67641b9ba344de595b7fec2431208f8e6 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 24 Jan 2017 19:50:25 +0100 Subject: Atomic reference count of binaries also in non-SMP NIF resources was not handled in a thread-safe manner in the runtime system without SMP support. As a consequence of this fix, the following driver functions are now thread-safe also in the runtime system without SMP support: - driver_free_binary() - driver_realloc_binary() - driver_binary_get_refc() - driver_binary_inc_refc() - driver_binary_dec_refc() --- erts/doc/src/erl_driver.xml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'erts/doc/src/erl_driver.xml') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index d8bf45c523..7fbe97bc0b 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -1103,8 +1103,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Decrements the reference count on bin and returns the reference count reached after the decrement.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

The reference count of driver binary is normally to be decremented by calling @@ -1124,8 +1123,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Returns the current reference count on bin.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

@@ -1137,8 +1135,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Increments the reference count on bin and returns the reference count reached after the increment.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

@@ -1434,8 +1431,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]> driver_alloc_binary. As binaries in Erlang are reference counted, the binary can still be around.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

@@ -1872,8 +1868,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Resizes a driver binary, while keeping the data.

Returns the resized driver binary on success. Returns NULL on failure (out of memory).

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

-- cgit v1.2.3