| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remember, the code
int is_less_than(int a, unsigned b) {
return a < b;
}
is buggy, since the C integer promotion rules basically turn it into
int is_less_than(int a, unsigned b) {
return ((unsigned)a) < b;
}
and we really want something closer to
int is_less_than(int a, unsigned b) {
return a < 0 || ((unsigned)a) < b;
}
.
Suggested by an example from Ralph Castain
|
| |
|
|
|
|
|
| |
This change means that all required include files are in event2, and
all files not in event2/* are optional.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, our default lock model kind of assumed that every lock was
potentially a read-write lock. This was a poor choice, since
read-write locks are far more expensive than regular locks, and so the
lock API should only use them when we can actually take advantage of
them. Neither our pthreads or win32 lock implementation provided rw
locks.
Now that we have a way (not currently used!) to indicate that we
really want a read-write lock, we shouldn't actually say "lock this
for reading" or "lock this for writing" unless we mean it.
|
|
|
|
|
|
| |
is meaningful to check for HAVE_CONFIG_H
svn:r1516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've gone through everything that it declared to see where it was used,
and it seems that we probably don't need it anywhere.
Here's what it declared, and why I think we're okay dropping it.
o struct timeval {}
(Used all over, and we can't really get away with declaring it ourselves;
we need the same definition the system uses. If we can't find struct
timeval, we're pretty much sunk.)
o struct timespec {}
(Used in event.c, evdns.c, kqueue.c, evport.c. Of these,
kqueue.c and event.c include sys/_time.h. event.c conditions its use on
_EVENT_HAVE_CLOCK_GETTIME, and kqueue() only works if timespec is defined.)
o TIMEVAL_TO_TIMESPEC
(Used in kqueue.c, but every place with kqueue has sys/time.h)
o struct timezone {}
(event2/util.h has a forward declaration; only evutil.c references it and
doesn't look at its contents.)
o timerclear, timerisset, timercmp, timeradd, timersub
(Everything now uses the evutil_timer* variants.)
o ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF, struct itemerval
(These are only used in test/regress.c, which does not include _time.h)
o CLOCK_REALTIME
(Only used in evdns.c, which does not include _time.h)
o TIMESPEC_TO_TIMEVAL
o DST_*
o timespecclear, timespecisset, timespeccmp, timespecadd, timespecsub
o struct clockinfo {}
o CLOCK_VIRTUAL, CLOCK_PROF
o TIMER_RELTIME, TIMER_ABSTIME
(unused)
svn:r1494
|
|
|
|
| |
svn:r1475
|
|
|
|
| |
svn:r1464
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is harder than it sounds, since we need to make sure to
release the lock around the key call to the kernel (e.g.,
select, epoll_wait, kevent), AND we need to make sure that
none of the fields that are used in that call are touched by
anything that might be running concurrently in another
thread. I managed to do this pretty well for everything but
poll(). With poll, I needed to introduce a copy of the
event_set structure.
This patch also fixes a bug in win32.c where we called
realloc() instead of mm_realloc().
svn:r1450
|
|
|
|
| |
svn:r1435
|
|
|
|
|
|
|
|
|
|
| |
New backends like poll and kqueue and so on add fds to the queue in
the order that they are triggered. But the select backend currently
activates low-numbered fds first, whereas the poll and win32 backends
currently favor whatever fds have been on for the longest. This is no
good for fairness.
svn:r1318
|
|
|
|
|
|
|
|
|
| |
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
disclaim some rights is sheer cargo-cultism.
svn:r1065
|
|
|
|
| |
svn:r1064
|
|
|
|
| |
svn:r1008
|
|
|
|
| |
svn:r1000
|
|
|
|
|
|
| |
evsignal_{add,del,set} instead; move the old definitions to compat
svn:r973
|
|
|
|
|
|
| |
events themselves, as a side effect multiple events can use the same fd or signal.
svn:r972
|
|
|
|
|
|
| |
features of a backend.
svn:r842
|
|
|
|
|
|
|
|
| |
make event_get_supported_methods obey environment variables; this
fixes make verify; problem reported by Scott Lamb.
svn:r838
|
|
|
|
|
|
|
| |
Rename internal memory management functions from event_malloc() etc to mm_malloc() etc.
svn:r725
|
|
|
|
|
|
|
| |
Split event.h into several new headers in include/event2. event.h is now just a wrapper that includes all the subheaders.
svn:r711
|
|
|
|
| |
svn:r692
|
|
|
|
| |
svn:r581
|
|
|
|
| |
svn:r555
|
|
|
|
|
|
|
| |
Add an --enable-gcc-warnings option (lifted from Tor) to the configure script. When provided, and when we are using GCC, we enable a bunch of extra GCC warnings in the compiler. Also, make the code all build happily with these warnings.
svn:r553
|
|
|
|
|
|
|
| |
New function event_set_mem_functions to replace internal calls to malloc, free, etc with a user-supplied functions.
svn:r541
|
|
|
|
| |
svn:r470
|
|
|
|
| |
svn:r377
|
|
|
|
|
|
|
|
|
|
| |
makes signals
work better with threading; from Wouter Wijngaards
small fixes for kqueue and style by me
svn:r351
|
|
|
|
| |
svn:r341
|
|
|
|
| |
svn:r340
|
|
|
|
|
|
|
| |
really ideal but good enough for me; from Nick Mathewson
svn:r339
|
|
|
|
| |
svn:r210
|
|
|
|
| |
svn:r208
|
|
|
|
| |
svn:r207
|
|
|
|
|
|
|
|
| |
better recovery when memory allocation fails; something that needs to be
done for the poll improvements, too.
svn:r166
|
|
|
|
| |
svn:r142
|
|
|
|
| |
svn:r136
|
|
|
|
| |
svn:r129
|
|
|
|
| |
svn:r122
|
|
|
|
| |
svn:r108
|
|
|
|
| |
svn:r84
|
|
|
|
| |
svn:r77
|
|
|
|
| |
svn:r45
|
|
|
|
| |
svn:r41
|
|
|
|
| |
svn:r40
|