diff kernel/process.c3 @ 300:158068af716c

yafm
author Windel Bouwman
date Tue, 03 Dec 2013 18:00:22 +0100
parents 9417caea2eb3
children 6753763d3bec
line wrap: on
line diff
--- a/kernel/process.c3	Sun Dec 01 18:37:23 2013 +0100
+++ b/kernel/process.c3	Tue Dec 03 18:00:22 2013 +0100
@@ -1,4 +1,5 @@
 module process;
+
 import memory;
 import kernel;
 
@@ -12,13 +13,13 @@
 // List<process_t> procs;
 
 // init is the root of all processes:
-var process_t* init = 0;
+var process_t* init_pid = 0;
 var int next_pid = 0;
 
 function void init()
 {
     next_pid = 0;
-    init = Create();
+    init_pid = Create();
 }
 
 /*
@@ -26,19 +27,19 @@
 */
 function process_t* Create()
 {
-    process_t* p = memory.Alloc(sizeof(process_t));
+    // process_t* p = memory.Alloc(sizeof(process_t));
     p->id = next_pid;
-    next_pid++;
+    next_pid = next_pid + 1;
     return p;
 }
 
 
-public func void Kill(process_t* p)
+function void Kill(process_t* p)
 {
     // clean memory
 }
 
-public process_t* byId(int id)
+function process_t* byId(int id)
 {
     // Perform lookup
     return 0;