tiempo

Páginas: 2 (324 palabras) Publicado: 6 de mayo de 2013
#include
#include
#include

void holamundo (void *ptr) {
printf("Hola Mundo \n");
}

int main(int argc, char *argv[]) {

pthread_t hilo1;
int estado;
struct signational;
/* handler, atributos del thread, función, argumentos de la función */

al.sa_handler = tratar_alarma;
sigemptyset(&al.sa_mask);
al.sa_flags=0;
sigaction(SIGALRM, &al,NULL);

for(;;){

alarm(12);

}
estado = pthread_create(&hilo1, NULL, (void *)&holamundo, NULL);
if (estado != 0)
printf ("Error al crear elThread\n");
estado = pthread_join(hilo1,NULL);
if (estado !=0)
printf("Thread unida\n");

return 0;
}

#include
#include
#include

void holamundo (void *ptr) {printf("Hola Mundo \n");
}

int main(int argc, char *argv[]) {

pthread_t hilo1;
int estado;
struct signation al;
/* handler, atributos del thread, función, argumentos de lafunción */

al.sa_handler = tratar_alarma;
sigemptyset(&al.sa_mask);
al.sa_flags=0;
sigaction(SIGALRM, &al, NULL);

for(;;){

alarm(12);

}estado = pthread_create(&hilo1, NULL, (void *)&holamundo, NULL);
if (estado != 0)
printf ("Error al crear el Thread\n");
estado = pthread_join(hilo1,NULL);
if (estado !=0)printf("Thread unida\n");

return 0;
}

#include
#include
#include

void holamundo (void *ptr) {
printf("Hola Mundo \n");
}

int main(int argc, char *argv[]) {pthread_t hilo1;
int estado;
struct signation al;
/* handler, atributos del thread, función, argumentos de la función */

al.sa_handler = tratar_alarma;sigemptyset(&al.sa_mask);
al.sa_flags=0;
sigaction(SIGALRM, &al, NULL);

for(;;){

alarm(12);

}
estado = pthread_create(&hilo1, NULL, (void *)&holamundo, NULL);...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • el tiempo antes del tiempo
  • Tiempo
  • Tiempo
  • ¿Qué Es El Tiempo?
  • el tiempo
  • el tiempo
  • tiempo
  • Tiempos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS