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 2d59d53 was 80d9e49, checked in by Thierry Delisle <tdelisle@…>, 9 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.