thread calcul ok

This commit is contained in:
quentin.perret 2022-06-13 17:24:53 +02:00
parent 52bded6534
commit ce37306f65
3 changed files with 5 additions and 4 deletions

View file

@ -73,7 +73,7 @@ long **getRawDataArray(char* rawDataFileName , int N , int M){
p = get(N, M); p = get(N, M);
fillArrayWithRawData(rawDataFileName,p ,N, M); fillArrayWithRawData(rawDataFileName,p ,N, M);
if(checkArrayFullyFill(p,N,M)){ if(checkArrayFullyFill(p,N,M)){
clearRawData(N); //clearRawData(N);
return p; return p;
} }
else{ else{

Binary file not shown.

View file

@ -23,11 +23,11 @@ double invTimeBandWidth = 0;
void *threadCalcul(void *vargp){ void *threadCalcul(void *vargp){
Pqueue rawDataQueue = firstRawDataQueue; Pqueue rawDataQueue = firstRawDataQueue;
char* fileName;
while(rawDataWriteFlag){ while(rawDataWriteFlag){
while(queueGetNextE(rawDataQueue) != NULL){ while(queueGetNextE(rawDataQueue) != NULL){
char* fileName = queueGetTabChar(rawDataQueue); rawDataQueue = queueGetNextE(rawDataQueue);
//queuePrintE(rawDataQueue); fileName = queueGetTabChar(rawDataQueue);
printf("%s\n",fileName);
power(fileName,nRow,nCol,period,invTimeBandWidth); power(fileName,nRow,nCol,period,invTimeBandWidth);
/*remove(queueGetTabChar(rawDataQueue)); /*remove(queueGetTabChar(rawDataQueue));
rawDataQueue = queueRmFrstE(rawDataQueue);*/ rawDataQueue = queueRmFrstE(rawDataQueue);*/
@ -36,6 +36,7 @@ void *threadCalcul(void *vargp){
} }
int main(int argc , char** argv){ int main(int argc , char** argv){
rawDataWriteFlag = true; rawDataWriteFlag = true;
period = 1 / freqEch; period = 1 / freqEch;