Using threads
1. Declare a variable of type pthread_t
2. Define a function to be executed by the thread.
3. Create the thread using pthread_create
Make sure creation is successful by checking the return value.
4. Pass any arguments need through’ arg (packing and unpacking arg list necessary.)
5. #include <pthread.h> at the top of your header file.
6. Compile: cc xyz.c -lpthread -lthread -lposix4