summaryrefslogtreecommitdiffstats
path: root/src/net/retry.c
Commit message (Collapse)AuthorAgeFilesLines
* [retry] Colourise debug outputMichael Brown2015-03-051-10/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Rewrite unrelicensable portions of retry.cMichael Brown2015-03-051-27/+41
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Expose retry_poll() to explicitly poll all running timersMichael Brown2012-08-311-3/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-201-1/+2
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Fix potential use-after-free in timer_expired()Michael Brown2011-07-161-1/+3
| | | | | | | | | timer->refcnt is allowed to be NULL, in which case the timer's expired() method may end up freeing the timer object. Discovered using valgrind. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Pass containing object pointer to process step() methodsMichael Brown2011-06-281-4/+1Star
| | | | | | | | | Give the step() method a pointer to the containing object, rather than a pointer to the process. This is consistent with the operation of interface methods, and allows a single function to serve as both an interface method and a process step() method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Process at most one timer's expiry in each call to retry_step()Michael Brown2010-11-081-3/+9
| | | | | | | | | | | | | | | | | | | | | Calling a timer's expiry method may cause arbitrary consequences, including arbitrary modifications of the list of retry timers. list_for_each_entry_safe() guards against only deletion of the current list entry; it provides no protection against other list modifications. In particular, if a timer's expiry method causes the subsequent timer in the list to be deleted, then the next loop iteration will access a timer that may no longer exist. This is a particularly nasty bug, since absolutely none of the list-manipulation or reference-counting assertion checks will be triggered. (The first assertion failure happens on the next iteration through list_for_each_entry(), showing that the list has become corrupted but providing no clue as to when this happened.) Fix by stopping traversal of the list of retry timers as soon as we hit an expired timer. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Hold reference while timer is running and during expiry callbackMichael Brown2010-09-031-2/+8
| | | | | | | | | Guarantee that a retry timer cannot go out of scope while the timer is running, and provide a guarantee to the expiry callback that the timer will remain in scope during the entire callback (similar to the guarantee provided to interface methods). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-5/+5
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Make it safe to call process_add() multiple timesMichael Brown2009-08-101-0/+1
|
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [retry] Use a separate flag to indicate that a retry timer is runningMichael Brown2008-10-121-4/+8
| | | | | Using start==0 to indicate a stopped timer is dangerous, because 0 is a valid value for the current tick counter.
* [retry] Added configurable timeouts to retry timerAndrew Schran2008-08-121-13/+15
| | | | | | | | New min_timeout and max_timeout fields in struct retry_timer allow users of this timer to set their own desired minimum and maximum timeouts, without being constrained to a single global minimum and maximum. Users of the timer can still elect to use the default global values by leaving the min_timeout and max_timeout fields as 0.
* [retry] Add start_timer_fixed()Michael Brown2008-06-111-5/+4Star
| | | | Allow for timers to be started with fixed timeouts.
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-021-1/+1
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Add start_timer_nodelay()Michael Brown2007-08-131-0/+12
|
* Use a linker-table based system to automatically mark and start upMichael Brown2007-07-031-8/+1Star
| | | | | permanent processes, rather than requiring each one to have its own initialisation function.
* Modify process semantics; rescheduling is now automatic.Michael Brown2007-05-261-6/+4Star
| | | | | | Add reference-counting to processes. Add timer_running() test.
* Move start/stop/expire debug messages to DBG2() level.Michael Brown2007-01-091-6/+6
|
* Added times to start/stop log messagesMichael Brown2006-12-271-8/+12
|
* Make start_timer() and stop_timer() robust against incorrect usage.Michael Brown2006-12-221-1/+8
|
* We don't actually have a stdio.h header file. Our printf() functions areMichael Brown2006-09-271-1/+0Star
| | | | | | | | defined in vsprintf.h. (This may change, since vsprintf.h is a non-standard name, but for now it's the one to use.) There should be no need to include vsprintf.h just for DBG() statements, since include/compiler.h forces it in for a debug build anyway.
* added stdio.h to includes for DBG compilationMarty Connor2006-09-271-0/+1
|
* Added extra debuggingMichael Brown2006-08-301-3/+6
|
* Towards an RFC2988-compliant timer.Michael Brown2006-08-091-18/+39
|
* Updated retry timer mechanism to incorporate smoothed RTT estimation.Michael Brown2006-06-011-47/+63
| | | | AoE now uses the retry timer mechanism.
* One bit of an ASCII character can make a big difference.Michael Brown2006-05-291-1/+1
|
* Added first sketch of a generic retry timer mechanism. The idea is to useMichael Brown2006-05-291-0/+130
these timer objects in AoE and UDP protocols (where there is no underlying retransmission mechanism) without requiring each protocol to implement its own individual retry logic. Eventually, we should be able to use the same timer code for TCP retransmissions as well.