Code: Select all
#include <platform.h>
#include <xs1.h>
#include <print.h>
int main(){
chan c_tokens;
par{
on stdcore[0]:{
//void outct ( chanend c, unsigned char val)
outct(c_tokens,8);
}on stdcore[1]:{
char token=0;
//void inct_byref ( chanend c, unsigned & val )
inct_byref(c_tokens, token);
printint(token);}
}
return 0;
}
Code: Select all
void inct_byref(chanend c, unsigned &val);
#define inct_byref(c, val) __builtin_inct_byref(c, val)
(Writing unsigned token=0; doesn't compile)