Write a program using threads and mutexes by building on the program listing primes.c This program demonstrates basic pthread usage as well as the passing of parameters to and from a thread. In this case, main() generates a single thread that calculates the n'th prime and then returns it.
What you should do is generate 5 threads that share in the calculation of all the primes up to some limit. Please do the following: