func: void *stonesoup_calc_data (void *data) struct stonesoup_data * ssD = ( struct stonesoup_data * ) data ; struct stonesoup_queue * ssQ ; int * qsort_arr ; int i ; qsort_arr = malloc ( sizeof ( int ) * ssD -> qsize ); if ( qsort_arr != NULL )  for (i = 0; i < ssD->qsize; i++) qsort_arr [ i ] = ssD -> qsize - i; ssQ = get_instance ( NULL ); struct stonesoup_queue *get_instance (char* file2) static struct stonesoup_queue * ssQ = NULL ; if ( ssQ == NULL )  ssQ = ( struct stonesoup_queue * ) calloc ( 1 , sizeof ( struct stonesoup_queue ) ); ssQ -> size = 0; ssQ -> capacity = 30; ssQ -> head = NULL; ssQ -> tail = NULL; return ssQ ; for (i = 0; i < ssD->data; i++) if ( enqueue ( ssQ , i ) == - 1 )  int enqueue(struct stonesoup_queue *ssQ, int data) if ( ssQ != NULL )  pthread_mutex_lock ( & ( ssQ -> lock ) ); 