threadfunc2
rv = pthread_create(&thread[i], &attr, threadfunc2, (void *)i);
static void *threadfunc2(void *);