source: src/libcfa/concurrency/kernel @ bd98b58

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 bd98b58 was bd98b58, checked in by Thierry Delisle <tdelisle@…>, 7 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
26struct cluster {
27        simple_thread_list ready_queue;
28};
29
30void ?{}(cluster * this);
31void ^?{}(cluster * this);
32
33//-----------------------------------------------------------------------------
34// Processor
35struct processor {
36        struct processorCtx_t * ctx;
37        cluster * cltr;
38        coroutine * current_coroutine;
39        thread_h * current_thread;
40        bool terminated;
41};
42
43void ?{}(processor * this, cluster * cltr);
44void ^?{}(processor * this);
45
46
47//-----------------------------------------------------------------------------
48// Locks
49
50void ?{}(simple_lock * this);
51void ^?{}(simple_lock * this);
52
53void lock( simple_lock * );
54void 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.