MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / Thread_UpdateState

Function Thread_UpdateState

src/threadlist.cpp:857–869  ·  view source on GitHub ↗

* *****************************************************************************/

Source from the content-addressed store, hash-verified

855 *
856 *****************************************************************************/
857int
858Thread_UpdateState(Thread *th, ThreadState newval, ThreadState oldval)
859{
860 int res = 0;
861
862 JASSERT(DmtcpMutexLock(&threadStateLock) == 0);
863 if (oldval == th->state) {
864 th->state = newval;
865 res = 1;
866 }
867 JASSERT(DmtcpMutexUnlock(&threadStateLock) == 0);
868 return res;
869}
870
871/*****************************************************************************
872 *

Callers 3

pthread_createFunction · 0.85
suspendThreadsMethod · 0.85
stopthisthreadFunction · 0.85

Calls 2

DmtcpMutexLockFunction · 0.85
DmtcpMutexUnlockFunction · 0.85

Tested by

no test coverage detected