Mercurial > lcfOS
comparison kernel/process.c3 @ 292:534b94b40aa8
Fixup reorganize
author | Windel Bouwman |
---|---|
date | Wed, 27 Nov 2013 08:06:42 +0100 |
parents | c9781c73e7e2 |
children | 917eab04b8b7 |
comparison
equal
deleted
inserted
replaced
290:7b38782ed496 | 292:534b94b40aa8 |
---|---|
3 import kernel; | 3 import kernel; |
4 | 4 |
5 // process type definition: | 5 // process type definition: |
6 typedef struct { | 6 typedef struct { |
7 int id; | 7 int id; |
8 int status; | |
8 } process_t; | 9 } process_t; |
10 | |
11 // Or, use this list structure: | |
12 List<process_t> procs; | |
9 | 13 |
10 // init is the root of all processes: | 14 // init is the root of all processes: |
11 var process_t* init = 0; | 15 var process_t* init = 0; |
12 var int next_pid = 0; | 16 var int next_pid = 0; |
13 | 17 |
32 public func void Kill(process_t* p) | 36 public func void Kill(process_t* p) |
33 { | 37 { |
34 // clean memory | 38 // clean memory |
35 } | 39 } |
36 | 40 |
41 public process_t* byId(int id) | |
42 { | |
43 // Perform lookup | |
44 return 0; | |
45 } | |
37 | 46 |
47 |