Examples of using pthreads library in C/C++