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)
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)
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.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us