#include #include #include #include #include #include "messageAdder.h" #include "msg.h" #include "iMessageAdder.h" #include "multitaskingAccumulator.h" #include "iAcquisitionManager.h" #include "debug.h" //consumer thread pthread_t consumer; //Message computed volatile MSG_BLOCK out; //Consumer count storage volatile unsigned int consumeCount = 0; /** * Increments the consume count. */ static void incrementConsumeCount(void); /** * Consumer entry point. */ static void *sum( void *parameters ); MSG_BLOCK getCurrentSum(){ //TODO } unsigned int getConsumedCount(){ //TODO } void messageAdderInit(void){ out.checksum = 0; for (size_t i = 0; i < DATA_SIZE; i++) { out.mData[i] = 0; } //TODO } void messageAdderJoin(void){ //TODO } static void *sum( void *parameters ) { //D(printf("[messageAdder]Thread created for sum with id %d\n", gettid())); unsigned int i = 0; while(i