for (uint32_t i = 0; i < g_numthreads; i++) {
ret = pthread_create(&threads[i], NULL, worker_thread, (void*)(uintptr_t)i);
if (ret) errc(EX_OSERR, ret, "pthread_create %d", i);
for (uint32_t i = 0; i < g_numthreads; i++) {
ret = pthread_create(&threads[i], NULL, worker_thread, (void*)(uintptr_t)i);
if (ret) errc(EX_OSERR, ret, "pthread_create %d", i);