summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMarty Connor2007-07-03 22:02:26 +0200
committerMarty Connor2007-07-03 22:02:26 +0200
commit6be8cdbb6f2a003aed4b06ce15d296f2d9e0ebf2 (patch)
tree46830720996e606b842656b1b2ba52cf6c6947b7 /src/core
parentWarnings purge: src/arch/i386, src/core/disk.c, ramdisk, autoboot (diff)
parentUse a linker-table based system to automatically mark and start up (diff)
downloadipxe-6be8cdbb6f2a003aed4b06ce15d296f2d9e0ebf2.tar.gz
ipxe-6be8cdbb6f2a003aed4b06ce15d296f2d9e0ebf2.tar.xz
ipxe-6be8cdbb6f2a003aed4b06ce15d296f2d9e0ebf2.zip
Merge branch 'master' of /pub/scm/gpxe
Diffstat (limited to 'src/core')
-rw-r--r--src/core/main.c5
-rw-r--r--src/core/process.c18
2 files changed, 22 insertions, 1 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 64e098ca3..5b01df9cc 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -16,6 +16,7 @@ Literature dealing with the network protocols:
#include <gpxe/heap.h>
#include <gpxe/init.h>
+#include <gpxe/process.h>
#include <gpxe/device.h>
#include <gpxe/shell.h>
#include <gpxe/shell_banner.h>
@@ -29,8 +30,10 @@ Literature dealing with the network protocols:
* Call this function only once, before doing (almost) anything else.
*/
static void startup ( void ) {
- hide_etherboot();
init_heap();
+ init_processes();
+
+ hide_etherboot();
call_init_fns();
probe_devices();
}
diff --git a/src/core/process.c b/src/core/process.c
index 0583a398c..bd35e614f 100644
--- a/src/core/process.c
+++ b/src/core/process.c
@@ -30,6 +30,12 @@
/** Process run queue */
static LIST_HEAD ( run_queue );
+/** Registered permanent processes */
+static struct process processes[0]
+ __table_start ( struct process, processes );
+static struct process processes_end[0]
+ __table_end ( struct process, processes );
+
/**
* Add process to process list
*
@@ -72,3 +78,15 @@ void step ( void ) {
break;
}
}
+
+/**
+ * Initialise processes
+ *
+ */
+void init_processes ( void ) {
+ struct process *process;
+
+ for ( process = processes ; process < processes_end ; process++ ) {
+ process_add ( process );
+ }
+}