I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/
#include #include #define NU
check man page and you will get.
Compile and link with -pthread.
SYNOPSIS #include int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); Compile and link with -pthread. ....