ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
|
Last change
on this file since bd98b58 was bd98b58, checked in by Thierry Delisle <tdelisle@…>, 9 years ago |
|
Kernel now uses intrusive lists and blocking locks for ready queue management.
Update the plan for concurrency.
|
-
Property mode
set to
100644
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 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 |
|
|---|
| 20 | #include <stdbool.h>
|
|---|
| 21 |
|
|---|
| 22 | #include "invoke.h"
|
|---|
| 23 |
|
|---|
| 24 | //-----------------------------------------------------------------------------
|
|---|
| 25 | // Cluster
|
|---|
| 26 | struct cluster {
|
|---|
| 27 | simple_thread_list ready_queue;
|
|---|
| 28 | };
|
|---|
| 29 |
|
|---|
| 30 | void ?{}(cluster * this);
|
|---|
| 31 | void ^?{}(cluster * this);
|
|---|
| 32 |
|
|---|
| 33 | //-----------------------------------------------------------------------------
|
|---|
| 34 | // Processor
|
|---|
| 35 | struct processor {
|
|---|
| 36 | struct processorCtx_t * ctx;
|
|---|
| 37 | cluster * cltr;
|
|---|
| 38 | coroutine * current_coroutine;
|
|---|
| 39 | thread_h * current_thread;
|
|---|
| 40 | bool terminated;
|
|---|
| 41 | };
|
|---|
| 42 |
|
|---|
| 43 | void ?{}(processor * this, cluster * cltr);
|
|---|
| 44 | void ^?{}(processor * this);
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 | //-----------------------------------------------------------------------------
|
|---|
| 48 | // Locks
|
|---|
| 49 |
|
|---|
| 50 | void ?{}(simple_lock * this);
|
|---|
| 51 | void ^?{}(simple_lock * this);
|
|---|
| 52 |
|
|---|
| 53 | void lock( simple_lock * );
|
|---|
| 54 | void unlock( simple_lock * );
|
|---|
| 55 |
|
|---|
| 56 | #endif //KERNEL_H
|
|---|
| 57 |
|
|---|
| 58 | // Local Variables: //
|
|---|
| 59 | // mode: c //
|
|---|
| 60 | // tab-width: 4 //
|
|---|
| 61 | // End: //
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.