1. When pthread exit, set the default cancellability state to NONCANCELABLE state. 2. Make sure modify tcb->flags is atomic operations. Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>