#include "stdio.h" #include "mwmr_channel.h" #include "mapping_info.h" #include "hard_config.h" #if NB_TTY_CHANNELS == 1 # define printf(...) giet_shr_printf(__VA_ARGS__) #else # define printf(...) giet_tty_printf(__VA_ARGS__) #endif #define NMAX 50 ///////////////////////////////////////////// __attribute__ ((constructor)) void producer() { unsigned int n; unsigned int buf; mwmr_channel_t* mwmr; unsigned int procid = giet_procid(); unsigned int cluster_xy = procid/NB_PROCS_MAX; unsigned int lpid = procid%NB_PROCS_MAX; unsigned int x = cluster_xy >> Y_WIDTH; unsigned int y = cluster_xy & ((1<> Y_WIDTH; unsigned int y = cluster_xy & ((1<> Y_WIDTH; unsigned int y = cluster_xy & ((1<> 6; for ( n = 0 ; n < tempo ; n++ ) asm volatile (""); printf( "token value : %d / temporisation = %d\n", buf, tempo); mwmr_write( mwmr_out, &buf , 1 ); } }