Introduction to Programming Threads

Basic Thread Routines


Creation

int pthread_create(pthread_t * thread, 
                   const pthread_attr_t * attr,
                   void * (*start_routine)(void *), 
                   void *arg);


Termination

void pthread_exit(void * return_value);


Detach and Join

int pthread_detach(pthread_t thread);

int pthread_join(pthread_t thread, void ** status);


Self and Equal

pthread_t pthread_self(void);

int pthread_equal(pthread_1 t1, pthread_t t2);


[TOP] [BACK] [FORWARD]


Prepared by Chris Provenzano (proven@mit.edu)