pthread_create(&threads[started], NULL, search, (void *)pid);
pthread_create(&threads[started], NULL, search, (void *) (long int) pid);
int main(int argc, char ** argv){  int i;  int pid;  /* create a number to search for */  pid = getpid();  printf("Searching for the number = %d...\n", pid);  /* Initialize the mutex lock */  pthread_mutex_init(&lock, NULL);  /* Create the searching threads */  for (started=0; started<NUM_THREADS; started++)    pthread_create(&threads[started], NULL, search, (void *)pid);  /* Wait for (join) all the searching threads */  for (i=0; i<NUM_THREADS; i++)    pthread_join(threads[i], NULL);  printf("It took %d tries to find the number.\n", tries);  /* Exit the program */  return 0;}