Compare commits

..

2 commits

Author SHA1 Message Date
quentin.perret d6f1fc5cfa threads clean , captors choice ok 2022-06-15 16:29:55 +02:00
Aurélien Gauthier 9cf444c47e osef test error 2022-06-15 16:27:56 +02:00
3 changed files with 5 additions and 2 deletions

Binary file not shown.

View file

@ -53,6 +53,8 @@ void *threadCalculBoth(void *vargp){
char* fileName; char* fileName;
while(rawDataWriteFlag){ while(rawDataWriteFlag){
while(queueGetNextE(rawDataQueue) != NULL){ while(queueGetNextE(rawDataQueue) != NULL){
printf("ertyu\n");
rawDataQueue = queueGetNextE(rawDataQueue); rawDataQueue = queueGetNextE(rawDataQueue);
fileName = queueGetTabChar(rawDataQueue); fileName = queueGetTabChar(rawDataQueue);
powerFunction(fileName, NULL); powerFunction(fileName, NULL);
@ -111,7 +113,6 @@ int main(int argc , char** argv){
pthread_t rawData; pthread_t rawData;
pthread_create(&rawData , NULL, threadSimulateFlux, (void *)&rawData); pthread_create(&rawData , NULL, threadSimulateFlux, (void *)&rawData);
pthread_t calcul; pthread_t calcul;
pthread_create(&calcul , NULL, threadCalculBoth, (void *)&calcul); pthread_create(&calcul , NULL, threadCalculBoth, (void *)&calcul);

View file

@ -36,8 +36,10 @@ void powerFunction(char* rawDataFileName, double **pw){
if(p !=NULL){ if(p !=NULL){
if(pw == NULL){ if(pw == NULL){
powerCalculation(p,pww); powerCalculation(p,pww);
}else{ }else{
powerCalculation(p,*pw); powerCalculation(p,*pw);
} }
appendDataInFile("powerData.csv",*pw,nCol-1); appendDataInFile("powerData.csv",*pw,nCol-1);
freeArray(p,nRow); freeArray(p,nRow);