Tuesday, April 26, 2011

pthread

pthread_create(): create a thread, and thread starts to run
phtread_join(): suspend current execution, and wait until thread terminate

pthread_create() is similar with fork(); pthread_join() is similar with wait()

pthread_mutex_lock()
pthread_mutex_trylock()
pthread_mutex_unlock()

No comments: