Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Per compilare: gcc -Wall *nome.c -o nome -pthread
- Per eseguire : ./nome nome.c
- Per creare mutex: pthread_mutex_t nome = PTHREAD_MUTEX_INITIALIZER;
- lock: pthread_mutex_lock(&nome)
- unlock: pthread_mutex_unlock(&nome)
- pthread_exti(NULL)
- pthread_t nome;
- pthread_create(&tid_nome,NULL,nomemetodo,NULL)
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <pthread.h>
Advertisement
Add Comment
Please, Sign In to add comment