357 Commits

Author SHA1 Message Date
Niels Provos
90ddd91ff0 do not include sys/time.h on windows
svn:r826
2008-05-15 03:14:48 +00:00
Nick Mathewson
03fafae006 Make trunk event.c build happily on win32 under mingw.
svn:r811
2008-05-12 01:03:36 +00:00
Nick Mathewson
8acb80b4f9 r15551@tombo: nickm | 2008-05-08 14:49:20 -0400
Use _get_ convention for new accessor functions.  (These are all new ones as of 2.0, I believe).


svn:r799
2008-05-08 22:51:39 +00:00
Nick Mathewson
3d60bccc8e r19656@catbus: nickm | 2008-05-08 10:25:08 -0400
forward-port: Remove #include "misc.h"s.


svn:r795
2008-05-08 14:25:44 +00:00
Nick Mathewson
a26442c5ac r19649@catbus: nickm | 2008-05-08 10:00:14 -0400
Replace gettimeofday() usage with a new evutil_gettimeofday().  This removes all previous need for win32-code/misc.[ch]


svn:r792
2008-05-08 14:06:33 +00:00
Niels Provos
3f56e364b7 event_base_new_with_config() and related methods
svn:r789
2008-05-08 05:56:20 +00:00
Niels Provos
3b2022ef3a provide an api for retrieving the supported event mechanisms
svn:r788
2008-05-08 05:33:15 +00:00
Nick Mathewson
d0c3644e63 r19599@catbus: nickm | 2008-05-05 11:26:18 -0400
Turn event_initialized() and friends into a function; add function equivalents for EVENT_FD and EVENT_SIGNAL.


svn:r773
2008-05-05 15:45:30 +00:00
Nick Mathewson
40a44b36bb r19564@catbus: nickm | 2008-05-04 13:23:10 -0400
Fix compile with --enable-gcc-warnings and clock_gettime()


svn:r766
2008-05-04 17:23:20 +00:00
Niels Provos
181007b9cf make event_assign void; it cannot return an error
svn:r763
2008-05-03 22:14:44 +00:00
Niels Provos
1d30750b1d support for periodic timeouts
svn:r762
2008-05-03 22:10:09 +00:00
Niels Provos
8c750eaff8 separate signal events from io events
svn:r760
2008-05-03 21:37:33 +00:00
Niels Provos
45e6fb0dd2 cache clock_gettime/gettimeofday values in base
svn:r758
2008-05-03 18:23:44 +00:00
Nick Mathewson
5fbc7f0aee r15439@tombo: nickm | 2008-05-02 12:28:08 -0400
use event_assign internall; switch uses of event_set to use event_assign instead.


svn:r755
2008-05-02 16:28:25 +00:00
Nick Mathewson
fe2e7307f3 r15320@tombo: nickm | 2008-04-24 21:29:06 -0400
Yes, niels says this is safe.


svn:r727
2008-04-25 01:29:15 +00:00
Nick Mathewson
94fb4d0a1e r15317@tombo: nickm | 2008-04-24 21:17:49 -0400
Add new functions to be more threadsafe (and structure-ignorant) than event_set.


svn:r726
2008-04-25 01:18:18 +00:00
Nick Mathewson
49868b618a r15316@tombo: nickm | 2008-04-24 20:58:36 -0400
Rename internal memory management functions from event_malloc() etc to mm_malloc() etc.


svn:r725
2008-04-25 01:18:08 +00:00
Nick Mathewson
0ac73078ed r15193@tombo: nickm | 2008-04-16 16:00:35 -0400
Split event.h into several new headers in include/event2.  event.h is now just a wrapper that includes all the subheaders.


svn:r711
2008-04-16 20:01:51 +00:00
Niels Provos
cb50f615d4 rename lock create callback functions; as suggested by nick
svn:r691
2008-03-11 05:26:30 +00:00
Niels Provos
c182baca10 switch thread support so that locks get allocated as they are needed.
svn:r690
2008-03-10 03:17:20 +00:00
Niels Provos
558de9b377 Provide OpenSSL style support for multiple threads accessing the same event_base
svn:r684
2008-03-02 21:18:33 +00:00
Niels Provos
bb914ed9af do not insert event into list when evsel->add fails
svn:r660
2008-02-25 07:34:07 +00:00
Niels Provos
8ab618916f event_base_get_method; from Springande Ulv
svn:r635
2008-02-16 06:09:39 +00:00
Niels Provos
8c66d4e289 remove pending timeouts on event_base_free
svn:r627
2008-01-26 07:29:57 +00:00
Niels Provos
03589ccb12 rollback r594: restructuring to make event activation independent.
changes are going to wait for api design


svn:r612
2007-12-24 22:49:30 +00:00
Niels Provos
7aa845b73b restructure the code to make event activation independent of regular event logic
svn:r594
2007-12-16 04:10:30 +00:00
Niels Provos
fbe24f43ab remove obsoleted recalc code
svn:r581
2007-12-09 05:07:20 +00:00
Nick Mathewson
77861fa7f1 r16931@catbus: nickm | 2007-12-06 14:19:58 -0500
Fix warnings in debug messages


svn:r577
2007-12-06 19:20:24 +00:00
Nick Mathewson
3206bbca46 r15171@tombo: nickm | 2007-12-06 12:47:47 -0500
Use GCC attributes (where available) to verify printf type-correctness.  Fix some bugs this turned up.


svn:r573
2007-12-06 18:12:56 +00:00
Niels Provos
ef085e84c6 we need to pass the evbase to evsel->add
svn:r558
2007-11-27 06:45:25 +00:00
Niels Provos
5f3e31596b move EV_PERSIST handling out of the event backends
svn:r555
2007-11-27 01:39:10 +00:00
Nick Mathewson
1120f04f3e r16731@catbus: nickm | 2007-11-25 16:52:53 -0500
Replace all fds on non-unix-specific APIs with evutil_socket_t, which is int on unix and intptr_t on win32.


svn:r552
2007-11-25 21:53:06 +00:00
Nick Mathewson
7eb250e9c5 r14939@tombo: nickm | 2007-11-25 11:59:26 -0500
New function event_set_mem_functions to replace internal calls to malloc, free, etc with a user-supplied functions.


svn:r541
2007-11-25 17:14:19 +00:00
Niels Provos
98b5453ecd forgot to dealloc previous base
svn:r540
2007-11-25 07:11:59 +00:00
Niels Provos
88897852fc provide event_reinit() to reinitialized an event_base after fork - necessary for epoll/kqueue
svn:r539
2007-11-25 06:57:59 +00:00
Nick Mathewson
1c23e21952 r14931@tombo: nickm | 2007-11-17 17:21:09 -0500
Patch from Scott Lamb: Implement event_{base_}loopbreak.  Includes documentation and tests.  From sf.net Feature Request 1826546.


svn:r535
2007-11-17 22:21:42 +00:00
Niels Provos
f586f42885 provide event_base_new() as a mechanism for not setting the current_global
svn:r529
2007-11-14 17:52:21 +00:00
Niels Provos
d50afbb370 free minheap; from Christopher Layne
svn:r525
2007-11-13 03:32:10 +00:00
Niels Provos
3742868ab5 We do not need to specially remove a timeout before calling event_del; patch from Christopher Layne.
svn:r519
2007-11-12 06:54:35 +00:00
Niels Provos
4a1a2e0d52 Make the logic for active events work better with internal events; patch from Christopher Layne
svn:r509
2007-11-12 02:31:07 +00:00
Nick Mathewson
45c7ab25de r16510@catbus: nickm | 2007-11-07 02:29:42 -0500
Try not to shadow local variables or function arguments.


svn:r498
2007-11-07 07:33:36 +00:00
Nick Mathewson
f74e7258fd r16501@catbus: nickm | 2007-11-07 01:00:31 -0500
This is one of those patches which will either make matters far
 simpler after the bugs shake out, or will get reverted pretty quick
 once we realize that it is a stupid idea.
 
 We now post-process the config.h file into a new event-config.h file,
 whose macros are prefixed with _EVENT_ and which is thus safe for
 headers to include.  Using this, we can define replacement timeval
 manipulation functions in evutil.h, and use them uniformly through our
 code.  We can also detect which headers are needful in event.h, and
 include them as required.
 
 This is also the perfect time to remove the long-deprecated acconfig.h
 file, so that autoheader no longer warns.
 
 Should resolve the following issues:
 
 [ 1826530 ] Header files should have access to autoconf output.
 [ 1826545 ] acconfig.h is deprecated.
 [ 1826564 ] On some platforms, event.h can't be included alone.
 


svn:r492
2007-11-07 06:01:57 +00:00
Nick Mathewson
206d433638 r16497@catbus: nickm | 2007-11-07 00:01:02 -0500
Resolve issue 1826588: make event_base_free() succeed even if there are pending non-INTERNAL events still in the base.  This can leak memory and fds if used injudiciously, but at least it no longer crashes.


svn:r490
2007-11-07 05:02:21 +00:00
Nick Mathewson
e9564eceb3 r16487@catbus: nickm | 2007-11-06 22:38:44 -0500
Remove rtsig method, as discussed in July.  It hasn't compiled for quite a while, and nobody has seemed to miss it much.  Please let us know if this was a bad call. [Tracker issue 1826539].


svn:r485
2007-11-07 03:40:26 +00:00
Niels Provos
a527151846 make event_init should return struct event_base *
svn:r481
2007-11-07 01:48:44 +00:00
Niels Provos
2026b21598 remove last vestiges of RBTREE
svn:r470
2007-11-03 23:53:49 +00:00
Niels Provos
30ae40cc52 switch timeouts to a min heap; from Maxim Yegorushkin
svn:r467
2007-11-03 18:04:53 +00:00
Nick Mathewson
f4c84e8628 r15220@catbus: nickm | 2007-09-20 14:22:57 -0400
Another patch from Trond: Skip calling gettime() in timeout_process if we have no events in the timetree.


svn:r445
2007-09-20 18:27:01 +00:00
Niels Provos
10267216a6 initalize ev_res from Scott Lamb
svn:r372
2007-07-30 23:49:00 +00:00
Niels Provos
3ad6b47e03 make clock_monotonic work; do not use default timeout;
from Scott Lamb, plus some fixes from me.


svn:r371
2007-07-30 22:41:00 +00:00