source: src/libcfa/concurrency/threads @ 5c81105

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 5c81105 was 5c81105, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

cleaned-up coroutines code to no longer need a manual start

  • Property mode set to 100644
File size: 890 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);
25void ?{}(coroutine* this, covptr_t* object);
26
27trait coroutine_t(dtype T) {
28      void co_main(T* this);
29      covptr_t* vtable(T* this);
30};
31
32void suspend(void);
33
34forall(dtype T | coroutine_t(T))
35void resume(T* cor);
36
37#endif //__THREADS_H__
38
39// Local Variables: //
40// mode: c //
41// tab-width: 4 //
42// End: //
Note: See TracBrowser for help on using the repository browser.