summaryrefslogtreecommitdiff
path: root/lib/event.c
AgeCommit message (Collapse)Author
2022-02-03Socket cork fixesMaria Matejka
2021-12-07Event list asserts to prevent running into rotten dataMaria Matejka
2021-11-22Adding a generic cork mechanism for eventsMaria Matejka
2021-11-22Converting the former BFD loop to a universal IO loop and protocol loop.Maria Matejka
There is a simple universal IO loop, taking care of events, timers and sockets. Primarily, one instance of a protocol should use exactly one IO loop to do all its work, as is now done in BFD. Contrary to previous versions, the loop is now launched and cleaned by the nest/proto.c code, allowing for a protocol to just request its own loop by setting the loop's lock order in config higher than the_bird. It is not supported nor checked if any protocol changed the requested lock order in reconfigure. No protocol should do it at all.
2021-03-12Rate-limit scheduling of work-eventsOndrej Zajicek (work)
In general, events are code handling some some condition, which is scheduled when such condition happened and executed independently from I/O loop. Work-events are a subgroup of events that are scheduled repeatedly until some (often significant) work is done (e.g. feeding routes to protocol). All scheduled events are executed during each I/O loop iteration. Separate work-events from regular events to a separate queue and rate limit their execution to a fixed number per I/O loop iteration. That should prevent excess latency when many work-events are scheduled at one time (e.g. simultaneous reload of many BGP sessions).
2015-03-02Implement latency tracking, internal event log and watchdogOndrej Zajicek
2014-11-03Fininshing integrated OSPF.Ondrej Zajicek
2010-06-02Implements command that shows memory usage.Ondrej Zajicek
2010-02-21Fix configure to enable warnings and fix most of them.Ondrej Zajicek
2009-09-04Clear memory allocated by ralloc().Ondrej Zajicek
This also fixes bug that timer->recurrent was not cleared in tm_new() and unexpected recurrence of startup timer in BGP confused state machine and caused crash.
2008-12-18Fixes nasty bug in event processing.Ondrej Zajicek
WALK_LIST_DELSAFE (in ev_run_list) is not safe with regard to deletion of next node. When some events are rescheduled during event execution, it may lead to deletion of next node and some events are skipped. Such skipped nodes remain in temporary list on stack and the last of them contains 'next' pointer to stack area. When this event is later scheduled, it damages stack area trying to remove it from the list, which leads to random crashes with funny backtraces :-) .
2000-06-07Fixes to the progdoc.Martin Mares
2000-06-05Documented sockets, events and timers.Martin Mares
2000-04-27Event handlers no longer return re-queue flag. Instead of using it, justMartin Mares
call ev_schedule() on the same handler which should work perfectly now.
2000-01-16No more problems when events get scheduled during event processing.Martin Mares
1999-11-17ev_run() now returns whether the event has been requeued or not.Martin Mares
ev_run_list() now returns number of events which remain in the list.
1999-10-29Events now return a value. If it's non-zero, the event is re-queuedMartin Mares
for processing in next event cycle. This can be used to prevent background actions (hint: user commands) from hogging the CPU for too long time.
1999-02-11Real implementation of protocol state machines. Delayed startup/shutdownMartin Mares
should work now. Initial feeding of protocols by interfaces/routes is done from the event queue to prevent unwanted recursion.
1999-02-11Grrr, forgot to commit the event routines themselves :|Martin Mares