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 12d44bb was
80d9e49,
checked in by Thierry Delisle <tdelisle@…>, 8 years ago
|
Coroutines no longer require virtual pointers or any code beyond the get_coroutine routine
|
-
Property mode set to
100644
|
File size:
910 bytes
|
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 : Mon Nov 28 12:27:26 2016 |
---|
12 | // Last Modified By : Thierry Delisle |
---|
13 | // Last Modified On : Mon Nov 28 12:27:26 2016 |
---|
14 | // Update Count : 0 |
---|
15 | // |
---|
16 | |
---|
17 | #ifndef __THREADS_H__ |
---|
18 | #define __THREADS_H__ |
---|
19 | |
---|
20 | #include "invoke.h" |
---|
21 | |
---|
22 | void ?{}(coStack_t* this); |
---|
23 | |
---|
24 | void ?{}(coroutine* this); |
---|
25 | |
---|
26 | trait is_coroutine(dtype T) { |
---|
27 | void co_main(T* this); |
---|
28 | coroutine* get_coroutine(T* this); |
---|
29 | }; |
---|
30 | |
---|
31 | void suspend(void); |
---|
32 | |
---|
33 | forall(dtype T | is_coroutine(T)) |
---|
34 | void resume(T* cor); |
---|
35 | |
---|
36 | forall(dtype T | is_coroutine(T)) |
---|
37 | void prime(T* cor); |
---|
38 | |
---|
39 | #endif //__THREADS_H__ |
---|
40 | |
---|
41 | // Local Variables: // |
---|
42 | // mode: c // |
---|
43 | // tab-width: 4 // |
---|
44 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.