source: src/libcfa/concurrency/threads@ 550a3385

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 550a3385 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
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);
25
[80d9e49]26trait is_coroutine(dtype T) {
[78b3f52]27 void co_main(T* this);
[80d9e49]28 coroutine* get_coroutine(T* this);
[0e76cf4f]29};
30
[9129a84]31void suspend(void);
[0e76cf4f]32
[80d9e49]33forall(dtype T | is_coroutine(T))
[0e76cf4f]34void resume(T* cor);
35
[80d9e49]36forall(dtype T | is_coroutine(T))
37void 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.