1153 Commits

Author SHA1 Message Date
Nick Mathewson
de7f7a84a3 Remove in_callbacks check: allow full recursion in evbuffer callbacks. If you get yourself in an infinite loop, that's not our fault. Note this in the docs. Also reindent some docs now that my tabs match Niels's.
svn:r1046
2009-01-23 18:03:45 +00:00
Niels Provos
b1495865aa also install the buffer_compat.h header file
svn:r1044
2009-01-23 02:04:41 +00:00
Nick Mathewson
ec2f4cbc09 Move obsolete evbuffer function into include/event2/buffer_compat.h
svn:r1043
2009-01-23 01:35:57 +00:00
Nick Mathewson
c735f2b45a Code to allow multiple callbacks per evbuffer.
svn:r1042
2009-01-23 01:11:13 +00:00
Nick Mathewson
86d526a064 Start writing more of whatsnew-xx.txt, which will become whatsnew-2.0.txt
svn:r1041
2009-01-23 01:04:10 +00:00
Nick Mathewson
f20902a290 Remove evperiodic_assign and its related parts: its functionality is subsumed by EV_PERSIST timeouts.
svn:r1040
2009-01-22 17:56:15 +00:00
Nick Mathewson
5e6f6dcd1b Use EV_PERSIST on notify event for efficiency and simplicity.
svn:r1039
2009-01-22 17:48:55 +00:00
Nick Mathewson
20c20466fb Use EV_PERSIST in bufferevents for efficiency and simplicity.
svn:r1038
2009-01-22 17:48:27 +00:00
Nick Mathewson
dc1526e0da Fix warnings on compile: make static functions static.
svn:r1037
2009-01-22 17:48:16 +00:00
Niels Provos
fe72c885d9 fix signal processing for non-kqueue backends; when a signal callback delivers a signal; from Alexander Drozdov
svn:r1035
2009-01-22 06:23:14 +00:00
Niels Provos
a077fb8c09 rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku
svn:r1033
2009-01-22 02:47:35 +00:00
Niels Provos
56ea4687a5 Change the semantics of timeouts in conjunction with EV_PERSIST; timeouts in that case will now repeat until deleted.
svn:r1032
2009-01-22 02:33:38 +00:00
Nick Mathewson
309fc7c4ad New functions to provide sane threading callbacks with pthreads and win32 threading implementations.
svn:r1031
2009-01-21 07:51:25 +00:00
Niels Provos
70405e3c7a fix freebsd compile; from Alexander Drozdov
svn:r1030
2009-01-21 07:18:31 +00:00
Niels Provos
fa1c9a6d09 rename the backend from "event ports" to "evport" - this will allow environment based disabling to work
svn:r1027
2009-01-19 23:52:21 +00:00
Niels Provos
ed7e0e77ed bug fix and potentital race condition from Alexander Drozdov
svn:r1025
2009-01-19 23:40:11 +00:00
Nick Mathewson
f6eb1f816c Change evbuffer_read implementation to split data across chunks, and use readv when available. This should make us use less space.
svn:r1024
2009-01-19 21:53:03 +00:00
Nick Mathewson
a5901991c7 Use eventfd for main-thread notification where available (i.e., linux).
svn:r1023
2009-01-19 20:37:24 +00:00
Nick Mathewson
c3e9fcf672 Change the semantics of notify so we can implement it with eventfd or (given a different backend for win32) a windows Event.
svn:r1022
2009-01-19 20:22:47 +00:00
Nick Mathewson
34d2fd0634 Debug and enable pipe notification
svn:r1021
2009-01-19 19:46:03 +00:00
Niels Provos
ddf3ee976d make event ports compile again
svn:r1020
2009-01-19 07:00:51 +00:00
Nick Mathewson
ec4cfa33c9 Make event_break threadsafe; make notify-thread mechanism a little more generic; let it use pipes where they work.
svn:r1019
2009-01-19 01:34:14 +00:00
Nick Mathewson
2b7febc80a Fix osx compile
svn:r1018
2009-01-18 01:33:18 +00:00
Niels Provos
fed2fd0944 try to make devpoll work again; i dont have access to a machine
svn:r1017
2009-01-17 07:50:34 +00:00
Niels Provos
5e796901c1 clean up buffered data on reset; reported by Brian O'Kelley
svn:r1015
2009-01-16 00:25:54 +00:00
Niels Provos
83d2a34c99 rename time-test in comment to signal-test
svn:r1013
2009-01-15 06:15:24 +00:00
Nick Mathewson
8278c9be54 Note the one restriction on what you can do with the evbuffers of a bufferevent.
svn:r1011
2009-01-14 22:17:46 +00:00
Nick Mathewson
840318196b Make some evbuffer functions const
svn:r1010
2009-01-14 22:17:31 +00:00
Nick Mathewson
89fe316779 Update win32 code to put indices in evmap.
svn:r1009
2009-01-14 21:13:58 +00:00
Nick Mathewson
554e14934e Move per-fd info from eventops into evmap. Not done for win32.c yet.
svn:r1008
2009-01-14 20:52:32 +00:00
Nick Mathewson
3552ac1eb3 Do not allow chain length to expand indefinitely.
svn:r1007
2009-01-14 19:39:17 +00:00
Nick Mathewson
ad7f1b4ae9 The element size for our linear evmaps is a pointer, not the whole struct.
svn:r1006
2009-01-14 18:45:42 +00:00
Nick Mathewson
6bb2f84216 Add initializer functions for evmap types.
svn:r1005
2009-01-14 18:38:03 +00:00
Nick Mathewson
6d3ed0657d Simplify evbuffer_write logic: combine nearly all of WSASend and writev cases.
svn:r1004
2009-01-14 14:58:48 +00:00
Nick Mathewson
bab8f2e182 Fix compilation on win32 WSASend evbuffer_write() code.
Still not enabled until I make sure that the unit tests test this.  They _do_ pass.

svn:r1003
2009-01-13 22:02:32 +00:00
Nick Mathewson
9935d5b01e Fix win32 compilation. Surprisingly, unit tests pass too.
svn:r1002
2009-01-13 21:39:32 +00:00
Nick Mathewson
574d320217 There is no WSAEAGAIN. There is only Zuul^WSAEWOULDBLOCK.
svn:r1001
2009-01-13 20:50:34 +00:00
Nick Mathewson
169321c9e6 Rename four internal headers to follow the -internal.h convention.
svn:r1000
2009-01-13 20:26:37 +00:00
Nick Mathewson
822ca048ad Untested (and compiled-out) evbuffer_write backend to use WSASend on win32 where we use writev on unix.
svn:r998
2009-01-13 19:34:50 +00:00
Nick Mathewson
fbd5e820d7 Stop linking backends into libevent_extra.la
svn:r997
2009-01-13 19:20:22 +00:00
Nick Mathewson
554909420d Move internal headers into noinst_HEADERS automake target where they belong.
svn:r996
2009-01-13 19:20:14 +00:00
Nick Mathewson
81ab45add5 Use new EVUTIL_ERR_*_RETRIABLE macros when we're testing an errno for blocking.
Previously, we used inconsistent and incompletely ported ifdefs.
(We don't use these macros in platform-specific files like evpoll.c, since
they don't need to work on win32.)

svn:r995
2009-01-13 19:20:04 +00:00
Nick Mathewson
5ebd23ad74 New EVUTIL_ERR_*_RETRIABLE macros to tell if an errno blocked or failed.
svn:r994
2009-01-13 19:19:50 +00:00
Nick Mathewson
99db0e7f72 Add a new evbuffer_write_atmost() functino to write no more than a given number of bytes to an fd.
svn:r993
2009-01-12 20:42:19 +00:00
Nick Mathewson
f446f1493a Small cleanups to buffer.h documentation.
svn:r992
2009-01-12 20:42:06 +00:00
Nick Mathewson
1df57d2b97 Move strlcpy.c into libevent-core, so that code built against libevent-core on platforms without strlcpy can link.
svn:r991
2009-01-12 20:36:24 +00:00
Niels Provos
8a72441077 make it compile with USE_DEBUG again; reported by Alexander Drozdov
svn:r990
2009-01-12 05:22:29 +00:00
Nick Mathewson
91e3ead85e Improve the hashsocket function.
svn:r989
2009-01-10 14:37:45 +00:00
Nick Mathewson
55bcd7d2f0 On win32, use a hashtable to map sockets to events rather than using an array.
svn:r988
2009-01-09 13:42:21 +00:00
Nick Mathewson
8f5777e692 Document internal evmap functions, add a couple of asserts, and fix up some things that did not need to be void* any more
svn:r987
2009-01-09 05:01:48 +00:00