“pthread_create” Réponses codées

pthread_create

pthread_t tid; //declaration of thread id
pthread_create(&tid, NULL, &routine, NULL); 
//routine is a function that takes in void pointer and returns a void pointer
pthread_join(tid)
Chetan Sharaf

pthread_create

       #include <pthread.h>

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

       Compile and link with -pthread.
Outstanding Okapi

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code