note:
Process Mode:
pid_t pid = fork()
if ( pid == 0)
{ // child process to do }
else
{ // parent process to do
// waitpid( pid, & status, WNOHANG)
}
Pthread API
pthread_t thread;
int pthread_create( pthread_t * thread, const pthread_att_t * att,
void *(*start)(void *), void * arg)
pthread_t pthread_self()
int sched_yield()
int pthread_exit( void * value_ptr);
int pthread_detach( pthread_t pthread)
int pthread_jion( pthread_t thread, void **value_ptr)
2. synchronous
mutax
condition variable ( when the mutux condition does not meet, it will releas the mutux)
semphore