source: src/libcfa/concurrency/threads @ b58a5772

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 b58a5772 was 80d9e49, checked in by Thierry Delisle <tdelisle@…>, 7 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
22void ?{}(coStack_t* this);
23
24void ?{}(coroutine* this);
25
26trait is_coroutine(dtype T) {
27      void co_main(T* this);
28      coroutine* get_coroutine(T* this);
29};
30
31void suspend(void);
32
33forall(dtype T | is_coroutine(T))
34void resume(T* cor);
35
36forall(dtype T | is_coroutine(T))
37void 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.