12.07.2015 Views

Hilos - Universidad Nacional de San Antonio Abad del Cusco

Hilos - Universidad Nacional de San Antonio Abad del Cusco

Hilos - Universidad Nacional de San Antonio Abad del Cusco

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UNIVERSIDAD NACIONAL DE SAN ANTONIO ABAD DEL CUSCOSISTEMAS DE OPERACIONES IGUIA DE LABORATORIOecp 2 <strong>de</strong> 8Establecer el estado <strong>de</strong> terminaciónEl prototipo <strong>de</strong> esta función es:int pthread_attr_set<strong>de</strong>tachstate ();pthread_attr_t *attr,int <strong>de</strong>tachstateObtener el estado <strong>de</strong> terminaciónEl prototipo <strong>de</strong> esta función es:int pthread_attr_get<strong>de</strong>tachstate ();pthread_attr_t *attr,int *<strong>de</strong>tachstateCREACION, IDENTIFICACION Y TERMINACION DE HILOS.Crear un hiloEl prototipo <strong>de</strong> esta función es el siguiente:int pthread_create ();pthread_t *thread,pthread_attr_r *attr,void*(*start_routine) (void*),void *argObtener el i<strong>de</strong>ntificador <strong>de</strong> un hiloEl prototipo <strong>de</strong> esta función es:pthread_t pthread_self ( void );Esperar la terminación <strong>de</strong> un hiloEl prototipo <strong>de</strong> esta función es:int pthread_join ();pthread thid,void **valueFinalizar la ejecución <strong>de</strong> un hiloEl prototipo <strong>de</strong> esta función es:int pthread_exit ( void *value );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!