source: libcfa/src/concurrency/cofor.hfa @ cf34e82

Last change on this file since cf34e82 was 11ab0b4a, checked in by Peter A. Buhr <pabuhr@…>, 13 months ago

add corun/cofor statement, update old cofor

  • Property mode set to 100644
File size: 659 bytes
Line 
1#include <thread.hfa>
2
3//////////////////////////////////////////////////////////////////////////////////////////
4// cofor ( uC++ COFOR )
5typedef void (*__cofor_body_t)( ssize_t );
6
7void __Cofor__( ssize_t low, ssize_t high, __cofor_body_t loop_body );
8
9#define COFOR( lidname, low, high, loopbody ) \
10        { \
11                void __CFA_loopLambda__( ssize_t lidname ) { \
12                        loopbody \
13                } \
14                __Cofor__( low, high, __CFA_loopLambda__ ); \
15        }
16
17//////////////////////////////////////////////////////////////////////////////////////////
18// parallel (COBEGIN/COEND)
19typedef void (*parallel_stmt_t)( void * );
20
21void parallel( parallel_stmt_t * stmts, void ** args, size_t num );
Note: See TracBrowser for help on using the repository browser.