Programmation POSIX/Processus légers

Introduction modifier

#include <pthread.h>

Création modifier

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

La fonction pthread_create créée un nouveau thread qui exécute la fonction fonction_appelee en lui passant arg comme argument. La fonction renvoie 0 en cas de réussite et une valeur différente de 0 sinon.