actual code changes and additions for pthread api
changes from running bootstrap for pthread api