[erlang-patches] Add 'global' driver option to erl_ddll:try_load/3

Sverker Eriksson sverker.eriksson@REDACTED
Mon Apr 29 16:22:32 CEST 2013


Olivier Girondel wrote:
> This patch enables one to set the RTLD_GLOBAL flag when loading a driver
>
>   
What is the use case for the patch?

The RTLD_GLOBAL option will enable calls between drivers which is 
discouraged.

 From http://www.erlang.org/doc/man/erl_driver.html:

"It is assumed that drivers do not access other drivers. If drivers 
should access each other they have to provide their own mechanism for 
thread safe synchronization. Such "inter driver communication" is 
strongly discouraged."


Apart from thread safety, doing unloading of drivers in a safe way 
cannot be guaranteed by the VM if the driver to be unloaded is called by 
another driver.


/Sverker, Erlang/OTP




More information about the erlang-patches mailing list