Qualifying some functions calls in thread_primitives.hpp to avoid potentially ambiguity.