merged in relevant contents of test_parts/spthread_parts.h and the thread join algorithm of test_parts/account_pthread.c