ccms_thread_lock
ccms_thread_lock(cst, ostate);
void ccms_thread_lock(ccms_cst_t *cst, ccms_state_t state);