i declare my threads like this.
for (thread_num = 0; thread_num < NUM_THREADS; thread_num++) //for each thread do pthread_create(&thread_handle