https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_setcancelstate.html The pthread_setcancelstate() function may fail if: [EINVAL] The specified state is not PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE. The pthread_setcanceltype() function may fail if: [EINVAL] The specified type is not PTHREAD_CANCEL_DEFERRED or PTHREAD_CANCEL_ASYNCHRONOUS. Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>