Added near the beginning of main: // Catapults-specific: // register # open files with sched pth_schedvar_register("noof", &cow_noof); pth_schedvar_register("idlehands", &numidlehands); Added in the routine that spawns the thread pool: // Register our per-thread information with the scheduler pth_threadvar_register("isresponding", OFFSETOF(thrresponse, isresponding)); pth_threadvar_register("bytesleft", OFFSETOF(thrresponse, bytesleft)); ... // Create the Catapults scheduler data scheddata = malloc(sizeof(thrresponse)); if (scheddata == NULL) { perror("Failed to allocate sched data"); exit(errno); } scheddata->isresponding = 0; scheddata->bytesleft = 0; pth_set_userdata(tid, scheddata);