线程锁 with pthread