//                              -*- Mode: CFA -*-
//
// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
//
// The contents of this file are covered under the licence agreement in the
// file "LICENCE" distributed with Cforall.
//
// threads --
//
// Author           : Thierry Delisle
// Created On       : Mon Nov 28 12:27:26 2016
// Last Modified By : Thierry Delisle
// Last Modified On : Mon Nov 28 12:27:26 2016
// Update Count     : 0
//

#ifndef __THREADS_H__
#define __THREADS_H__

#include "invoke.h"

void ?{}(coStack_t* this);

void ?{}(coroutine* this);

trait is_coroutine(dtype T) {
      void co_main(T* this);
      coroutine* get_coroutine(T* this);
};

void suspend(void);

forall(dtype T | is_coroutine(T))
void resume(T* cor);

forall(dtype T | is_coroutine(T))
void prime(T* cor);

#endif //__THREADS_H__

// Local Variables: //
// mode: c //
// tab-width: 4 //
// End: //
