The Pthreads API subroutines can be informally grouped into four major groups:
Thread management: Routines that work directly on threads - creating, detaching, joining, set/query thread attributes (joinable, scheduling etc.), etc.
Mutexes: Routines that deal with synchronization. Mutex functions provide for creating, destroying, locking and unlocking mutexes, setting or modifying attributes associated with mutexes.
Condition variables: Routines that address communications between threads that share a mutex. Functions to create, destroy, wait and signal based upon specified variable values, set/query condition variable attributes.
Synchronization: Routines that manage read/write locks and barriers.
Creating Threads:
Initially, main program contains a single, default thread.
pthread_create creates a new thread and makes it executable.