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
RevLine 
[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
22void ?{}(coStack_t* this);
[0e76cf4f]23
[9129a84]24void ?{}(coroutine* this);
[5c81105]25void ?{}(coroutine* this, covptr_t* object);
[9129a84]26
[0e76cf4f]27trait coroutine_t(dtype T) {
[78b3f52]28      void co_main(T* this);
[5c81105]29      covptr_t* vtable(T* this);
[0e76cf4f]30};
31
[9129a84]32void suspend(void);
[0e76cf4f]33
34forall(dtype T | coroutine_t(T))
35void resume(T* cor);
36
37#endif //__THREADS_H__
[78b3f52]38
39// Local Variables: //
40// mode: c //
41// tab-width: 4 //
42// End: //
Note: See TracBrowser for help on using the repository browser.