summaryrefslogtreecommitdiffstats
path: root/src/core/process.c
Commit message (Collapse)AuthorAgeFilesLines
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). 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>
* [process] Add support for one-shot processesMichael Brown2011-06-281-2/+6
| | | | | | | | | Some processes execute only once, and exist solely in order to defer execution until after the relevant instantiator method has returned. Such processes do not need to be automatically rescheduled when executing. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Pass containing object pointer to process step() methodsMichael Brown2011-06-281-14/+28
| | | | | | | | | 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>
* [list] Add list_first_entry()Michael Brown2010-11-081-2/+2
| | | | | | | | | There are several points in the iPXE codebase where list_for_each_entry() is (ab)used to extract only the first entry from a list. Add a macro list_first_entry() to make this code easier to read. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Include step() function pointer in process debugging messagesMichael Brown2010-11-081-6/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Add process_running()Michael Brown2010-09-031-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Hold reference to process during call to step()Michael Brown2010-06-151-0/+2
| | | | | | | | | | | | It is conceivable that the process may terminate during the execution of step(). If nothing else holds a reference to the containing object, this would cause the object to be freed prior to returning from step(). Add a ref_get()/ref_put() around the call to ->step() to prevent this from happening. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-3/+3
| | | | | | | | | | | 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-3/+10
|
* [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.
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-131-8/+1Star
| | | | | | | | | | | | | | | Intel's C compiler (icc) chokes on the zero-length arrays that we currently use as part of the mechanism for accessing linker table entries. Abstract away the zero-length arrays, to make a port to icc easier. Introduce macros such as for_each_table_entry() to simplify the common case of iterating over all entries in a linker table. Represent table names as #defined string constants rather than unquoted literals; this avoids visual confusion between table names and C variable or type names, and also allows us to force a compilation error in the event of incorrect table names.
* [process] Add DBG2() messages to help track down frozen processesMichael Brown2008-10-121-0/+2
|
* Add debug messages to process.cMichael Brown2007-07-101-0/+4
|
* Separated out initialisation functions from startup/shutdown functions.Michael Brown2007-07-041-1/+7
|
* Use a linker-table based system to automatically mark and start upMichael Brown2007-07-031-0/+18
| | | | | permanent processes, rather than requiring each one to have its own initialisation function.
* Modify process semantics; rescheduling is now automatic.Michael Brown2007-05-261-4/+22
| | | | | | Add reference-counting to processes. Add timer_running() test.
* Added basic code for implementing co-operative multitasking.Michael Brown2006-04-291-0/+56
Yes, you really can do it in 65 bytes.