ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since c84e80a was
c84e80a,
checked in by Thierry Delisle <tdelisle@…>, 8 years ago
|
Kernel now supports [0-9] cfa threads on a single core, using round-robin scheduling and no preemption
|
-
Property mode set to
100644
|
File size:
920 bytes
|
Rev | Line | |
---|
[8118303] | 1 | // -*- Mode: CFA -*- |
---|
| 2 | // |
---|
| 3 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
---|
| 4 | // |
---|
| 5 | // The contents of this file are covered under the licence agreement in the |
---|
| 6 | // file "LICENCE" distributed with Cforall. |
---|
| 7 | // |
---|
| 8 | // threads -- |
---|
| 9 | // |
---|
| 10 | // Author : Thierry Delisle |
---|
| 11 | // Created On : Tue Jan 17 12:27:26 2016 |
---|
| 12 | // Last Modified By : Thierry Delisle |
---|
| 13 | // Last Modified On : -- |
---|
| 14 | // Update Count : 0 |
---|
| 15 | // |
---|
| 16 | |
---|
| 17 | #ifndef KERNEL_H |
---|
| 18 | #define KERNEL_H |
---|
| 19 | |
---|
[c84e80a] | 20 | #include <stdbool.h> |
---|
[8118303] | 21 | |
---|
[c84e80a] | 22 | struct processor { |
---|
| 23 | struct proc_coroutine * cor; |
---|
| 24 | unsigned int thread_index; |
---|
| 25 | unsigned int thread_count; |
---|
| 26 | struct thread_h * threads[10]; |
---|
| 27 | bool terminated; |
---|
| 28 | }; |
---|
| 29 | |
---|
| 30 | void ?{}(processor * this); |
---|
| 31 | void ^?{}(processor * this); |
---|
| 32 | |
---|
| 33 | void scheduler_add( struct thread_h * thrd ); |
---|
| 34 | void scheduler_remove( struct thread_h * thrd ); |
---|
[8118303] | 35 | void kernel_run( void ); |
---|
| 36 | |
---|
| 37 | #endif //KERNEL_H |
---|
| 38 | |
---|
| 39 | // Local Variables: // |
---|
| 40 | // mode: c // |
---|
| 41 | // tab-width: 4 // |
---|
| 42 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.