d600de916f8ad500adc3dc7c060308a2abcfe381 |
|
13-Feb-2018 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Fix usec comparison in timeout_update_next
When tv_usec is exactly 1000000, call to kevent() will fail
because tv_sec does not get incremented.
Found by Adrian Gonzalez <adrianglz@globalpc.net> |
2f2c523b0870412d4631917fa166ee312508e0ec |
|
30-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib: ioloop: Add functions for adding/moving timeouts and ios to a specific ioloop. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
391fa11260d54e3e1c58ab876e32ff5bc9680c60 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: io_loop_context_deactivate() - Assert that given context is currently active |
76da9d599128d5305a02aae25a26af8cfbf94fc8 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: io_loop_context_new() - deactivate old context
Since it changes the current context, it needs to deactivate the old one. |
1da9355e6497f66ddb50e3c482e00507c7cfd8bc |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: io_loop_destroy() - Assert-crash if ioloop contet is still set
It may be too late to try to deactivate it at that point, so it points to a
bug. |
204ee6ed414f5e4eeb6f6c10763b55daf56f11ac |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on [io]_stream_unref(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- i_stream_unref(&E);
- }
+ i_stream_unref(&E);
@@
expression E;
@@
- if (E != NULL) {
- o_stream_unref(&E);
- }
+ o_stream_unref(&E); |
c4d38ef68c615df366208e087fdca99f14b5a3cd |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib: timeout_remove(NULL) should be a no-op |
df1c1ff470f0e15911953638de0a5e10015ef5a2 |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib: io_remove(NULL) and io_remove_closed(NULL) should be no-ops |
bcd91686ef26fe36f7e0f69366b822879f012d9f |
|
06-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Free io_switch_callbacks_free only after other atexit-callbacks
Fixes a crash at deinit where io_loop_remove_switch_callback() was called in
lib_atexit() callback. |
db19aa0cec905a84d2b5e63d5f46bbf930ae0f28 |
|
09-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: When logging I/O or timeout leak, log also raw backtrace
This can be useful when trying to figure out where the io_loop_destroy() was
called from. |
65b82c99b1db81a56a1e6c9e92fe8eec49fb36b3 |
|
09-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Add asserts to make sure running ioloop is always current_ioloop
We could also switch current_ioloop to the running ioloop temporarily while
calling callbacks, but this behavior is probably clearer. All of the
existing code should already work this way.
Add the asserts after IO or timeout callback is called, so if the assert
triggers, we can find out which callback caused the change. The initial
assert in io_loop_handler_run() is enough to verify that the initial
ioloop is correct. |
68d25b7a8254bc0c508733a5822968a98869769c |
|
08-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: If CORE_IO_LEAK environment is set, panic on IO/timeout leaks |
1f1a96729e5c09f5021fe1c00a8f07c9cb168118 |
|
29-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: io_loop_set_current() - do nothing if ioloop doesn't change
There's no need to call the switch callbacks if the ioloop doesn't change. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
64f5f4f0e0c80ea8dc6f06f59e447fdf488635d0 |
|
15-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Added io_wait_timer
This allows easier tracking of how much time the io_wait_timer has been
spending on (multiple) ioloops. |
3809334f938c69df473f154978204e9044840c0b |
|
15-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Code cleanup - move code to ioloop_add_wait_time() |
bd3f036fda5cf08d7b23e2681ecc759ad71843f5 |
|
15-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Fix ioloop wait times when io_loop_time_refresh() is used |
d327ea02dc39399e8b231d0c833ed94c3be20bce |
|
24-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Added ioloop_global_wait_usecs
This is helpful when multiple ioloops aren't used and
io_loop_get_wait_usecs() can't be easily used for all of them. |
3e41b3d0cf90bbc1c229abb98cad944373316362 |
|
23-Oct-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Ensure tv_r gets set in io_loop_get_wait_time
If this does not get reset here to 0 it can cause
errors or unpredictable behaviour in select/kqueue
polling, such as very long delays. |
dfa23b2ddc43f323112225facf7cd7191e62e02c |
|
03-Oct-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
io: Add source filename
This will make debugging alot easier
when you can see what the filename is as well. |
789645e6790507d99f900ecb7c48e1d65a015458 |
|
22-Sep-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Update ioloop attributes
With pending IO, the ioloop attributes still need
updating, instead of just returning. |
15cdc6b0ecd87f4cddc18e765601ad5c6b1b5ab1 |
|
20-Sep-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Prevent crash in ioloop
If only non-fd sources and no timeouts are
in ioloop, prevent crash and unnecessary
waiting when there are pending IOs. |
3c5ee51327f075dc13cdacf46135f7f0abbdaafe |
|
02-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Changed t_pop() API to make it a bit more like free() |
e2588872c1fe79642589b805aaab9fbb6750771b |
|
02-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Created data_stack_frame_t type for data_stack_frame |
3ba6ab5cf21a912c3a1b58dbf256b3c1dce6700b |
|
01-Mar-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Fixed memory leak io_add_istream()+io_remove() when the stream didn't have fd. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
7f52e276c1bf13b4809344492023b90e46c3ac5d |
|
11-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Added io_loop_find_fd_conditions() |
fb4bd85e7d254f65570d3c860b34fc3e963b25b6 |
|
21-Sep-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Added io_loop_get_wait_usecs() |
9b3565b09683b48f66de51aebb52786934d1c324 |
|
27-Aug-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Try fixing ec6e672a6e32 (ioloop timeout fixing)
Previous code was broken at least when moving a timeout between ioloops.
This is now tested and works. |
9c0c600b351ec8043f538026937d4273d11812a8 |
|
27-Aug-2015 |
Timo Sirainen <tss@iki.fi> |
Reverted ec6e672a6e32 for now due to some bugs. |
72a7c4f2ba93a723e23c941369a2985d75f240c9 |
|
27-Aug-2015 |
Stephan Bosch <stephan@rename-it.nl> |
ioloop: Delay actual start of a new normal timeout until the next io_loop_run() cycle.
This makes sure that timeouts will not expire before they get a chance to
run. |
bebc9fe2061be7066a0a4c3aa6ffb98a8f4c0d20 |
|
05-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Don't call ioloop context deactivate() if activate() hasn't been called yet.
This could have happened immediately after the callback was registered. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
fde8872151fcf82c3bc862d21a6b72acfe0fb171 |
|
29-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib: io_remove() should finish closing the io before unreferencing its istream.
This is because the istream unreferencing may close the fd. |
b3ba8f62212c3e0cb8c27fb5e87e0419a47397c8 |
|
04-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib: Fixed io_loop_move_timeout() to retain the next_run time, so that the timeout is not implicitly reset.
This problem became with timeout_add_absolute(), since resetting an
absolute timeout causes it to fire immediately (msecs == 0). |
dad72f97449874c60826d7e7a1e550d1689018b2 |
|
04-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib: ioloop: Fixed absolute timeout removal.
Absolute timeouts fire only once, so the timeout should be removed from the
priority queue once it fires. |
9aa6561ac5686a6a82f331d662d02456ecfba76e |
|
30-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Fixed earlier timeout_add_absolute() commit.
I removed too much from Stephan's patch. |
43a2fa01834fd18d0a7788a58c5efad1c445a021 |
|
30-Sep-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib: Added support for setting timeouts at absolute time, rather than relative to current time. |
85b14555888acec410734a16561f2d79c626cad9 |
|
25-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Code cleanup - check io_loop_context_add/remove_callbacks() callback parameters. |
cc80e458f2e3f13106299794376e9be4d3e8ef80 |
|
15-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
io_add_istream(): Allow the istream to be added even if it doesn't have fd. |
33b0119d4effb14cd0f1bdd3ad5f2954e3b1e63e |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: add identifying markers to data-stack frames
Add a string parameter to t_push() so that in DEBUG mode,
misbehaviour inside a stack level can be blamed on someone.
Default the T_BEGIN macro to automatigally use __FUNCTION__ or
__FILE__:__LINE__ as that identifier, therefore no clients of
those macros need to change.
ioloop used t_push() directly as it wanted customised diagnostic
strings. To preserve this friendliness, also introduce a t_push_named()
which takes a format string with paramters.
Apart from the unused paramter, a non-DEBUG build should see no
changes.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
7cb40f22322214d363ccc0f3e451d1341cf65cda |
|
19-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
ioloop: Fixed segfault crash in io_loop_call_pending().
When a callback called io_set_pending(), the io_loop_call_pending() loop
crossed the end of the ioloop->io_files list.
Based on patch by Stephan Bosch |
4c096615cb86a826fda377b87df22c579bfe5525 |
|
03-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
Added io_add_istream() and related functionality for combining the ioloop/istream.
The idea here is that it's possible to implement asynchronous istreams when
there isn't a file descriptor that can be used to reliably receive updates. |
f922ecaf766c60c10f642f3ac2d5f7748ff642b0 |
|
03-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
ioloop: Added io_set_pending() |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
888e0f4be6b8085fa42b6bd7f7ce67f14e88c73f |
|
17-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
Added io_loop_add/remove_switch_callback() to call a callback when ioloop is changed. |
35f3b7e05afecacd0332c210c6e253911c2813d8 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
Use io_loop_set_current() instead of directly setting it. |
ecc0cf8395c1e4036ce483ff4bf08855312074e9 |
|
23-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
io_loop_run() now assert-crashes if it's attempted to be used recursively for the same ioloop. |
01243115311a0da7c65bdce6d6e0b9632ff97186 |
|
19-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
Compiling fix for Sun compilers.
I wish gcc/clang warned about these as well, as sometimes they indicate bugs. |
090489d44d0f1469a1de7220e330dcd4be6c0d8e |
|
05-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
Added io_loop_have_immediate_timeouts() |
4ddc84facf9bafde1e3d81fae017b420b4f092f9 |
|
26-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
timeout_add_short(1) may have caused infinite looping. |
a4b14aa6a7367e6d72d57c6324ef32fccd8ded83 |
|
26-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Added io_loop_have_ios() |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
eb493a9993bce313e0750db6787459ef39067944 |
|
13-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Memory leak fix |
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4 |
|
23-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
The non-obvious APIs where NULL parameter was changed to "" are
master_service_init() and auth_master_user_list_init().
These checks can currently be enabled only on a patched clang:
http://llvm.org/bugs/show_bug.cgi?id=6786 |
4b335788eb41dec2de5f78459d96387fcc710010 |
|
20-May-2012 |
Timo Sirainen <tss@iki.fi> |
Use timeout_add_short() for sub-second timeouts. Fail at compile time if timeout_add() is <1s.
In future timeout_add() could perhaps also be made less precise, so that it
would try to group timeouts to run around at the same time. |
6e20d8af0ffb1370df4804c3f02f274754b16e8a |
|
19-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
timeout_reset(): Don't use cached ioloop_timeval.
Timeouts are sometimes reset after a long running callback. In those cases a
cached timeval may be too far behind. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
a23a481f9dfd5f14ebf2768b51b6fbc1cce1c864 |
|
01-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
ioloop: I/O and timeout leak messages now include the io_add()/timeout_add() source line number.
This helps figuring out the leak especially when using ASLR. Also in 64bit
systems there's no increased memory usage, because the line number replaces
only padding. |
b7fa2a01671caf02a06f2349b2b1150c8cebcfeb |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
ioloop: Memory leak fix on ioloop destroy. |
0536ccb51d41e3078c3a9fa33e509fb4b2420f95 |
|
21-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
Renamed lib/*-internal.h files to lib/*-private.h for consistency. |
22e0c38e6755a0ae90d780a81b4ca58094f24448 |
|
15-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
liblib: Added io_loop_time_refresh() |
6bf4371f70d6f2767eb474d85e00368a15e09ba8 |
|
24-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
liblib: Added io_loop_get_current_context() |
ae800c8a965688ab17415397dbc759a429e78199 |
|
24-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
liblib: io_loop_context_remove_callbacks() now requires also callbacks. |
1388b590dbd85245b591346f860bc1319953318a |
|
16-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
Replaced "ioloop log" with a more generic "ioloop context".
The context can call multiple callbacks that can do anything they want,
including setting the log prefix. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
ad99e7b93f55958bed1c21e072880306323f6244 |
|
23-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
ioloop: Memory leak fix. |
562d0d9daf4a36c8434a217a02919017fddc1aa4 |
|
26-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
ioloop: Use -1 for infinite poll/epoll timeout rather than INT_MAX.
Should improve performance a tiny bit and also works around a CPU eater bug
in Linux 2.6.37. |
61cb43e243a82d4037e919ec996fcb840c669e9c |
|
26-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
ioloop: Use -1 for infinite poll/epoll timeout rather than INT_MAX.
Should improve performance a tiny bit and also works around a CPU eater bug
in Linux 2.6.37. |
33d7b371841275bb3f9abf82f2ca99a839f5db6a |
|
13-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
Added io_loop_move_io() and io_loop_move_timeout(). |
c74ee9cd8a76da721969adaa5d8bc80116a728be |
|
03-Dec-2010 |
Timo Sirainen <tss@iki.fi> |
ioloop: Don't leak memory when detecting a leaked timeout. |
7992630160be0c8b1dcd78aa8756878cda1bbd48 |
|
03-Dec-2010 |
Timo Sirainen <tss@iki.fi> |
ioloop log: Added asserts |
b9a13c136b7c5803a8271878fcbbf5328f6e7f2a |
|
03-Dec-2010 |
Timo Sirainen <tss@iki.fi> |
ioloop: Added support for per-io/timeout callback log prefix automation. |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
7ef3553585e556f35d5919589cfdc1de3329e4bb |
|
12-Aug-2009 |
Timo Sirainen <tss@iki.fi> |
Moved all struct timeval comparing/calculation code to lib/time-util.
--HG--
branch : HEAD |
6795f542ed816a3c977085d4f74df1d62a37b690 |
|
22-Jun-2009 |
Timo Sirainen <tss@iki.fi> |
ioloop: Added callback for handling time jumping forwards/backwards.
The default implementation is now to only log a warning when time moves
backwards. The callback is also called if it's detected that time jumps
forwards. In both cases existing timeouts' run times are updated so that
they're called approximately the intended time.
--HG--
branch : HEAD |
306f6bb8791755257c0db900f17659402c660057 |
|
27-May-2009 |
Timo Sirainen <tss@iki.fi> |
Removed ioloop_timezone. It's not working nowadays.
--HG--
branch : HEAD |
dac0b2e5e0f38c6d95ef1a842d891480db580236 |
|
15-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Added io_loop_set_max_fd_count() to specify how many fds we expect to use.
It's used currently only for figuring out how much space should be
allocated initially to fds.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
421bd1f3e8f7ce7cc7879f2209d0293ce9cce0c0 |
|
30-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
ioloop: 0 ms timeouts could still have caused infinite looping.
--HG--
branch : HEAD |
0ec6ded9dc9a250ca814cde26ed5409b8bf9ac4e |
|
30-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Avoid integer overflows when calculating with very large timeout values.
--HG--
branch : HEAD |
193f5296d2a6b847970c222d8a261b89aae46331 |
|
01-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Don't break if io_remove() or timeout_remove() are called for non-active ioloops.
--HG--
branch : HEAD |
745f2c7424d88e368eff0a3a7650b352a9d1f0dd |
|
21-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
Added io_remove_closed().
--HG--
branch : HEAD |
1ca87894d589f407dd676b6e814fb317367b5c36 |
|
25-May-2008 |
Timo Sirainen <tss@iki.fi> |
timeout_add(0, ..) was looping in timeout handling code.
--HG--
branch : HEAD |
19e8adccba16ff419f5675b1575358c2956dce83 |
|
11-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Renamed T_FRAME_BEGIN/END to T_BEGIN/END. Removed T_FRAME() macro and
replaced them with T_BEGIN/END calls. T_FRAME() made it difficult to debug
code with gdb.
--HG--
branch : HEAD |
dbee59fd565fa0c081baf985ad597160ad77d81d |
|
12-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Another fix for io_loop_get_wait_time()
--HG--
branch : HEAD |
7b6a6efd2a56e014133e94c3dbea1f22deb5c669 |
|
12-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
timeout_get_wait_time() may have returned negative seconds in timeval. Also
changed the timeval variable name to tv_r to make it clearer it's a return
value.
--HG--
branch : HEAD |
20a3870db4f78717574ee94bca1512994391b2ab |
|
03-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Use priority queue to implement timeout handling. Added timeout_reset().
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
b33d19283284013a608cd678f41cbffa9723c65d |
|
21-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Added assert.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
c3ef0ca49561319d40095a4aefbec339683ea908 |
|
09-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Delay initializing ioloop backend until it's needed.
--HG--
branch : HEAD |
5c9ffeb24b4aea7ba624a1a9efead75d9eeb71bc |
|
22-May-2007 |
Timo Sirainen <tss@iki.fi> |
Added wiki link to "time moved backwards" error.
--HG--
branch : HEAD |
a15c94a794454f8c1cfd52cc91f3294b0b0365cd |
|
26-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Don't crash when timeouts have leaked
--HG--
branch : HEAD |
ff33b4ab6ba0d5187802ea703f57015864332eb9 |
|
15-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
If poll()/etc. timeouts, we didn't handle time timeouts immediately but
called poll()/etc again with zero timeout and then handled the timeouts.
--HG--
branch : HEAD |
1c1239263b575a79a9d49161e3f8f91dedc03556 |
|
15-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
If timeout wait time was less than 1 millisecond, we wasted CPU calling
poll() (or whatever) with zero timeout multiple times until the millisecond
had passed. Now we round the waits up to next millisecond.
--HG--
branch : HEAD |
dcc76bb1e1bb287e3e71e6a39a7ca207fab0eaa8 |
|
08-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Various cleanups to ioloop code.
--HG--
branch : HEAD |
83f8360f8505c78ca2b51241e1dd80ff4f6d2523 |
|
07-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Added a comment about the time moving backwards code.
--HG--
branch : HEAD |
e7c468c37ffacd2d2dc540fb61692c1e328bdce9 |
|
07-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Don't die if "time moved backwards" sleep is interrupted.
--HG--
branch : HEAD |
58a79d10b0bff49c81722b9343e87f9aed64ffc0 |
|
06-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
If time moves backwards only max. 5 seconds, sleep instead of killing
ourself.
--HG--
branch : HEAD |
f43e4dc04b30c0754a36923367e5920f5d0a231b |
|
28-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
If time moves backwards, kill ourself.
--HG--
branch : HEAD |
f63e1c5b0d59ca301af06eb560aad71d9cca952a |
|
15-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Delay initializing I/O notify backend until the first notify is added.
Non-IMAP processes never need notifies.
--HG--
branch : HEAD |
59151b71059df1190acd75d8717ed04a7920c862 |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added context parameter type safety checks for most callback APIs.
--HG--
branch : HEAD |
0fdc8e7e2cf9ba4effe709984751dc2f2891a6d1 |
|
17-Aug-2006 |
Timo Sirainen <tss@iki.fi> |
io_add_notify() didn't set refcount so io_remove() crashed for it.
--HG--
branch : HEAD |
52065ed197a2b352acd0d67d141912addad3f8fd |
|
17-Aug-2006 |
Timo Sirainen <tss@iki.fi> |
OK, so the original kqueue code wasn't actually broken, but it could have
been made much simpler. Updated comments in ioloop.h about IO_READ and
IO_ERROR usage.
--HG--
branch : HEAD |
01385cd68a168283916f5cee959f4c2f9bdb40cf |
|
24-Mar-2006 |
Timo Sirainen <tss@iki.fi> |
Timers weren't called always properly when they should have.
--HG--
branch : HEAD |
369a5d69112b71ad5994eab8eef07c906ab4f57f |
|
05-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Don't crash if we couldn't add I/O notifier.
--HG--
branch : HEAD |
283ccfe110ed62e48f36e0d84e47da8cae5106be |
|
28-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Cleanups: Make io_remove() do the linked list updating also for notify
handlers. Removed notify_context from struct io, and moved it to a new
struct inotify_io.
--HG--
branch : HEAD |
a40f21e8239a87a8fab2648955b0f568908ca8b5 |
|
28-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
kqueue updates. Patch by Vaclav Haisman
--HG--
branch : HEAD |
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
2261e1f0a3d678f9d0c1c4a197e6f6de0516a09f |
|
31-Dec-2005 |
Timo Sirainen <tss@iki.fi> |
Export current_ioloop globally.
--HG--
branch : HEAD |
6246b93fb37890dcb2f4df9896438f3f376ab284 |
|
14-Aug-2005 |
Timo Sirainen <tss@iki.fi> |
New inotify code and notify API change. Patch by Johannes Berg
--HG--
branch : HEAD |
a912d084eb8024ce35462c9fd2d50b86b13d8d33 |
|
14-Aug-2005 |
Timo Sirainen <tss@iki.fi> |
If we leaked a t_pop() call, tell where it happened
--HG--
branch : HEAD |
9d7451b57769988f7e3e41cd8790e65429ffc5c7 |
|
12-Jul-2005 |
Timo Sirainen <tss@iki.fi> |
Added inotify patch by Johannes Berg and did some restructuring to
ioloop notify internals.
--HG--
branch : HEAD |
90da11b31d498cd653ec7232b334b6057198ab46 |
|
25-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Changed io_remove() to destroy the io immediately. Changed struct io to be
double linked list. Moved highest_fd into select-specific struct. Some minor
optimizations.
--HG--
branch : HEAD |
3b87fda4154fed46ccc0663ff03a1374f68328b1 |
|
25-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Moved highest_fd calculation to select-specific code. Patch by Andrey Panin.
--HG--
branch : HEAD |
099bd1273cb6c664b5e57826c5a82640a483882d |
|
23-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Internal I/O loop API change in preparation for epoll support. Patch by
Andrey Panin.
--HG--
branch : HEAD |
64459307547aaa9d17e440e18d92fbf0497d4597 |
|
19-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
fix for fix
--HG--
branch : HEAD |
9f5c9ecc83c451f32c186d53da238996aa4d66fb |
|
19-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
io_remove() fix
--HG--
branch : HEAD |
5e0ce63bb65db34d7f48b34bbb5545fa791781c4 |
|
26-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Removed most of the license comments from src/lib/*.c. It's just fine to
keep them in a single COPYING.MIT file. Changed a few other comments as well.
--HG--
branch : HEAD |
9bf98814caf6ca9091a77e1eeb5d64bfc5c537af |
|
24-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Added IO_DIR_NOTIFY and IO_FILE_NOTIFY conditions to io_add(). IO_DIR_NOTIFY
is now implemented for Linux dnotify.
--HG--
branch : HEAD |
4d1a0d73d7dc03669b36f12a8af9978de361ad06 |
|
24-May-2003 |
Timo Sirainen <tss@iki.fi> |
bugfixes
--HG--
branch : HEAD |
007d354a674fb3ddf49db160cf050cf61270a1a0 |
|
23-May-2003 |
Timo Sirainen <tss@iki.fi> |
Removed I/O priorities. They were pretty much useless and were just getting
in way.
--HG--
branch : HEAD |
6b67f0aee601e74767c0c337bcf39df8210d3092 |
|
16-May-2003 |
Timo Sirainen <tss@iki.fi> |
If there were no timeouts, struct timeval wasn't initialized and select()
might have failed because of it. Patch by Mark E. Mallett.
--HG--
branch : HEAD |
18d788657cff0fc3905b6a484d33c8c9fc2b9eba |
|
11-Apr-2003 |
Timo Sirainen <tss@iki.fi> |
minor memory leak/cleanup fixes
--HG--
branch : HEAD |
d3f6396d948380248f0a8614fd35620516b10cfd |
|
19-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Check gettimeofday() failures
--HG--
branch : HEAD |
55804424c3000222029bb619232a755547a723d7 |
|
13-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Don't inline timeout_update_next(). gcc 3.2.2 with -O2 seems to break it.
--HG--
branch : HEAD |
7013075e208bc7aa87257df7d9664c84c7c220f3 |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Removed useless parameters from io_callback_t and timeout_callback_t.
--HG--
branch : HEAD |
a3e4bc66fc6501374fdaa3ebb5a9e676756d0726 |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Added io_loop_is_running()
--HG--
branch : HEAD |
f923659c0e5298263d80622c99f4dc4132b4675b |
|
11-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming change for function typedefs.
--HG--
branch : HEAD |
c0435c854a0e7246373b9752d163095cc4fbe985 |
|
05-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming style changes, finally got tired of most of the typedefs. Also the
previous enum -> macro change reverted so that we don't use the highest bit
anymore, that's incompatible with old indexes so they will be rebuilt.
--HG--
branch : HEAD |
eef4c69e0c1759aaaddcef341c817bb1e374ed24 |
|
04-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Misc. compiler warning fixes.
--HG--
branch : HEAD |
c9fae156bb2dd1f4d1e2632cb396d630a9efb0c1 |
|
28-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
changed t_push() and t_pop() to return unsigned int. added global
data_stack_frame which is used by TempString to verify it's accessed only
in the same frame.
--HG--
branch : HEAD |
201108608e6686d3e9dce9b95678a814122b6471 |
|
24-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Fixes to timezone handling which were handling quite badly. added
ioloop_timezone which gets updated with ioloop_time. Changed some GMT
references to UTC. Timezone offsets are in minutes now everywhere instead of
seconds. Fixes for unsigned time_t.
--HG--
branch : HEAD |
62505210a7e6d1b2e35fac335a6c875a7c98ccfb |
|
10-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Created datastack_mempool which is used by at least a few temporary
IOBuffers. Some other minor speedups/cleanups in IOBuffer and elsewhere..
--HG--
branch : HEAD |
647afe054117804e3e156b46ada4c5bec0ac4c38 |
|
09-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
ioloop_create() takes now pool-parameter. io_buffer_create_mmaped() takes
start_offset parameter instead of getting it with lseek(). Instead of using
offsets to index file, we now use record indexes (first_hole_index, tree
file).
--HG--
branch : HEAD |
55ed31258c4d6f58c72260036848b6c4703e6eb7 |
|
04-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
extra checks
--HG--
branch : HEAD |
1215bc4d7e747846f282cf710e61f3768e69238d |
|
22-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
s/user_data/context/ and some s/Data/Context/
--HG--
branch : HEAD |
66251e6ab31e5cc153fe5cae608e416dacafe9cd |
|
08-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Initial revision
--HG--
branch : HEAD |