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

Method libdlLockLock

src/threadsync.cpp:122–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122bool
123ThreadSync::libdlLockLock()
124{
125 int saved_errno = errno;
126 bool lockAcquired = false;
127
128 // The process is still initializing. We don't need to acquire lock.
129 if (WorkerState::currentState() == WorkerState::UNKNOWN) {
130 return false;
131 }
132
133 if (libdlLockOwner != gettid()) {
134 JASSERT(DmtcpMutexLock(&libdlLock) == 0);
135 libdlLockOwner = gettid();
136 lockAcquired = true;
137 }
138 errno = saved_errno;
139 return lockAcquired;
140}
141
142void
143ThreadSync::libdlLockUnlock()

Callers

nothing calls this directly

Calls 3

currentStateFunction · 0.85
DmtcpMutexLockFunction · 0.85
gettidFunction · 0.70

Tested by

no test coverage detected