1.pthread_create function creates thread that share the same memory with the process.
2.pthread_join function wait for threads until they stop
3.The pthread_self function returns the thread ID of the thread in which it is
called; This thread ID is compared with another thread ID using the
pthread_equal function
1 if (! pthread_equal (Pthread_self (), other_thread)) 2 pthread_join (Other_thread, NULL);
4.one of thread ' s important attribute is the detach State,which includes joinable State (default) and detached thread.t He difference is, the joinable thread is not automatically cleaned up by Gnu/linux when it terminates,but needs Pthread_join to does the clean up. A detached thread is just the opposite.
Even if a thread is created in a joinable state, the It may later being turned into a detached thread. To does this, call Pthread_detach. Once a thread is detached, it cannot be made joinable again.