Is it safe to use driver_event()?

Raimo Niskanen <>
Mon Aug 25 14:26:08 CEST 2003


Hi Vance.

I introduced driver_event because I needed it, and tried to make it 
sufficiently generic. It may change in the future, but not much more 
than the other driver interface functions. Its only problem is that it 
is new, and someone may point out that it should have been generic in 
some other way.

But, whe do not intend to change it or remove it since it is needed for 
some of our odd drivers that also depend on poll(). And we will always 
try to use poll() in favour of select() (until something better turns up).

So, fully implemented? For now, at least, and as always we will try to 
make changes backwards compatible (to not break our own drivers).

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Vance Shipley wrote:
> I'm building a dynamically linked in driver and I really need to
> have the poll() version of driver_select() because my file handles
> are used with STREAMS and I need to maintain the extra data which
> poll() handles.
> 
> I was happy to find the existance of the driver_event() function
> which does exactly what I need:
> 
> EXTERN int driver_event(ErlDrvPort port, ErlDrvEvent event,
>          ErlDrvEventData event_data);                      
> 
> ... and the associated callback:
> 
> void (*event)(ErlDrvData drv_data, ErlDrvEvent event, 
>         ErlDrvEventData event_data);
>                                 /* Called when an event selected by 
>                                    driver_event() has occurred */
> 
> It is however not documented, and of even more concern, not used
> anywhere.
> 
> Is this feature considered fully implemented?  How much trouble
> am I asking for if I use it?
> 
> 	-Vance
> 




More information about the erlang-questions mailing list