#include #include #include "common_threads.h" void *mythread(void *arg) { long long int value = (long long int) arg; printf("%lld\n", value); return (void *) (value + 1); } int main(int argc, char *argv[]) { pthread_t p; long long int rvalue; Pthread_create(&p, NULL, mythread, (void *) 100); Pthread_join(p, (void **) &rvalue); printf("returned %lld\n", rvalue); return 0; }