MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / pthread_setcancelstate

Function pthread_setcancelstate

include/hamlib/winpthreads.h:739–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737
738
739static int pthread_setcancelstate(int state, int *oldstate)
740{
741 pthread_t t = pthread_self();
742
743 if ((state & PTHREAD_CANCEL_ENABLE) != state) return EINVAL;
744 if (oldstate) *oldstate = t->p_state & PTHREAD_CANCEL_ENABLE;
745 t->p_state &= ~PTHREAD_CANCEL_ENABLE;
746 t->p_state |= state;
747
748 return 0;
749}
750
751static int pthread_setcanceltype(int type, int *oldtype)
752{

Callers

nothing calls this directly

Calls 1

pthread_selfFunction · 0.85

Tested by

no test coverage detected