[erlang-questions] Using sigwait in linked driver causes erl_ddll:load to return {error, {open_error, -10}}

Serge Aleynikov <>
Sun Apr 19 00:53:32 CEST 2009


Could you share with us how high resolution timers are related to sigwait?

If your mere use of linked-in driver is to get access to high-res 
timers, the overhead of calling a function through a linked-in driver 
(that can take 5-10us) will defeat the purpose of high-res timers (that 
give nanosec resolution).  Though up until FFI is embedded in the 
distribution this is the "fastest" existing interface.

Serge

Rob Elsner wrote:
> Hynek,
> 
>> Signal handling is at per process handling in Linux (in *nix systems
>> generally). IMHO it is wrong idea using it in linked-in drivers at all. You
>> will end up with unmaintainable mess because each change in signal handling
>> in erts or any other linked-in driver will break whole system.
> 
> That's fine that you think it's the wrong idea, but it's one of the
> few ways to get high resolution timers.  I chose a linked in driver
> because of the reduced communication overhead back to an erlang
> process.
> 
> The sigwait is not called until a process actually uses the port for
> the driver, all of the other setup is done identically.  If I leave
> sigwait uncommented, it won't load.  If I comment out just that line,
> the driver loads correctly.
> 
> Thanks,
> Rob
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 




More information about the erlang-questions mailing list