source:
src/libcfa/concurrency/threads
@
12d44bb
Last change on this file since 12d44bb was 80d9e49, checked in by , 8 years ago | |
---|---|
|
|
File size: 910 bytes |
Rev | Line | |
---|---|---|
[78b3f52] | 1 | // -*- Mode: CFA -*- |
[0e76cf4f] | 2 | // |
[78b3f52] | 3 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
[0e76cf4f] | 4 | // |
5 | // The contents of this file are covered under the licence agreement in the | |
6 | // file "LICENCE" distributed with Cforall. | |
7 | // | |
[78b3f52] | 8 | // threads -- |
[0e76cf4f] | 9 | // |
[78b3f52] | 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 | |
[0e76cf4f] | 15 | // |
16 | ||
17 | #ifndef __THREADS_H__ | |
18 | #define __THREADS_H__ | |
19 | ||
[5c81105] | 20 | #include "invoke.h" |
[78b3f52] | 21 | |
22 | void ?{}(coStack_t* this); | |
[0e76cf4f] | 23 | |
[9129a84] | 24 | void ?{}(coroutine* this); |
25 | ||
[80d9e49] | 26 | trait is_coroutine(dtype T) { |
[78b3f52] | 27 | void co_main(T* this); |
[80d9e49] | 28 | coroutine* get_coroutine(T* this); |
[0e76cf4f] | 29 | }; |
30 | ||
[9129a84] | 31 | void suspend(void); |
[0e76cf4f] | 32 | |
[80d9e49] | 33 | forall(dtype T | is_coroutine(T)) |
[0e76cf4f] | 34 | void resume(T* cor); |
35 | ||
[80d9e49] | 36 | forall(dtype T | is_coroutine(T)) |
37 | void prime(T* cor); | |
38 | ||
[0e76cf4f] | 39 | #endif //__THREADS_H__ |
[78b3f52] | 40 | |
41 | // Local Variables: // | |
42 | // mode: c // | |
43 | // tab-width: 4 // | |
44 | // End: // |
Note: See TracBrowser
for help on using the repository browser.