pull in new threading code based on tinycthreads