[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] What was EV_PRI for in 1.4.12?



On 5/10/2010 8:19 AM, Nick Mathewson wrote:
On Mon, Oct 4, 2010 at 5:01 PM, Daniel Janzon<janzon@xxxxxxxxx>  wrote:
Hello,

I have some old code linked against libevent 1.4.12, but I want to
upgrade to the latest version. However, it didn't compile unless I
removed the EV_PRI bit in event_set. It doesn't seem to exist in later
code, I grepped for it. I was doing

event_set(..., EV_PRI | EV_PERSIST, ...)

but had to change to

event_set(..., EV_PERSIST, ...).

For some reason this seems to break it; the event doesn't get set.
Anyhow, my question to the list is what did the EV_PRI flag do?

Nothing whatsoever as far as I can tell; Libevent never defined it or
looked for it as far as I can tell.  Grep for it in the source for
libevent 1.4.12-stable, and it shouldn't be there.

In fact, AFAICT, no version of Libevent in the source repository has
ever contained the string "EV_PRI" :

[279]% git log -p origin/master | grep EV_PRI
[280]% git log -p origin/patches-1.4 | grep EV_PRI
[281]% git log -p origin/patches-1.3 | grep EV_PRI
[282]% git log -p origin/patches-1.2 | grep EV_PRI
[283]% git log -p origin/patches-1.1 | grep EV_PRI
[284]%

So if there was a version that declared or inspected EV_PRI, it
doesn't seem to be an ancestor of any current version of Libevent that
I can find.

Were you maybe using some forked version of 1.4.12-stable?

I also did a Google codesearch for EV_PRI, using ' EV_PRI[^A-Z_]
case:yes ' as my query, and got no hits.


This is probably a modified version of libevent, libevent doesn't support PRI events, eg EPOLLPRI for epoll. Some drivers I was using use this event, so I had to modify my copy of 1.4.13-stable to support it. Someone at your end Daniel has probably done the same and if you just upgrade to the new version you will lose their modifications and you will no longer be able to get these priority events. I suggest diffing your source against a fresh copy of 1.4.12-stable to see the changes.

--
Tristan
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.