pthread initialization