Using the same method as above create a program that passes parameters from one function to other. You must have at least four functions. Like if you implement a quartic equation function it includes operations such as square root, multiplication, subtraction and division. You must implement an equation something like that and create threads while passing parameters as void pointers to the next function.
You will implement same equation. This time all threads are to be created in a main thread and you have to perform synchronization among these so that flow of the program remains same. You can use any method as you like signal handling, lock and test, semaphores or monitors. Use any method that you wish to implement.