add __thread to prnt and subf