mate_threat to thread.h