We "ingest" the libevent releases from their distribution. Frankly, I am really loath to modify it as they become resistant to helping us with problems if we do, and the event lib is deeply embedded in our code.
Would you please take the libevent modifications to them? Nick et al are very open to contributions.
As for the "unused" params - I suspect you will find they are present due to compatibility with other event_add calls so they can all be called from within the same code without additional if-else switching.
On Apr 19, 2012, at 6:43 AM, Alex Margolin wrote:
> I'm writing a new polling module and I stumbled upon some strange code:
> The following function is implemented in openmpi-trunk/opal/mca/event/libevent2013/libevent/signal.c :
> evsig_add(struct event_base *base, evutil_socket_t evsignal, short old, short events, void *p)
> - It appears the three last paramaters are not used at all!
> It's a coincidence that I'm just trying to register ANY signal handler to interrupt my ppoll syscall, so It may work out,
> but I'm not sure how I'm supposed to use this function to set my own handler, not what the other parameters are for.
> I've attached my patch for OPAL so far... I'll appreciate any advice.
> devel mailing list