Mercurial > lcfOS
comparison kernel/process.c3 @ 410:6aa9743ed362 tip
Reflect change in c3 public modifier
author | Windel Bouwman |
---|---|
date | Mon, 23 Feb 2015 21:06:04 +0100 |
parents | ad6be5454067 |
children |
comparison
equal
deleted
inserted
replaced
408:ad6be5454067 | 410:6aa9743ed362 |
---|---|
14 var process_t* first_process; | 14 var process_t* first_process; |
15 var process_t* last_process; | 15 var process_t* last_process; |
16 var int next_pid; | 16 var int next_pid; |
17 var process_t* current; | 17 var process_t* current; |
18 | 18 |
19 function void init() | 19 public function void init() |
20 { | 20 { |
21 next_pid = 0; | 21 next_pid = 0; |
22 first_process = 0; | 22 first_process = 0; |
23 last_process = 0; | 23 last_process = 0; |
24 } | 24 } |
25 | 25 |
26 /* | 26 /* |
27 Create a new process. | 27 Create a new process. |
28 */ | 28 */ |
29 function process_t* create() | 29 public function process_t* create() |
30 { | 30 { |
31 var process_t* p; | 31 var process_t* p; |
32 | 32 |
33 p = memory.alloc(sizeof(process_t)); | 33 p = memory.alloc(sizeof(process_t)); |
34 p->id = next_pid; | 34 p->id = next_pid; |
62 function void kill(process_t* p) | 62 function void kill(process_t* p) |
63 { | 63 { |
64 // clean memory | 64 // clean memory |
65 } | 65 } |
66 | 66 |
67 function process_t* byId(int id) | 67 public function process_t* byId(int id) |
68 { | 68 { |
69 // Perform lookup | 69 // Perform lookup |
70 return 0; | 70 return 0; |
71 } | 71 } |
72 | 72 |
73 | 73 |
74 function void execute_next() | 74 public function void execute_next() |
75 { | 75 { |
76 var process.process_t *old; | 76 var process_t *old; |
77 | 77 |
78 old = 0; | 78 old = 0; |
79 | 79 |
80 if (old != current) | 80 if (old != current) |
81 { | 81 { |