Lines Matching refs:threadID
81 // Returns true if threadID is in the set.
82 bool find(SkThreadID threadID) const {
84 if (t == threadID) return true;
90 bool tryAdd(SkThreadID threadID) {
92 if (t == threadID) return false;
94 fThreadIDs.append(1, &threadID);
98 bool tryRemove(SkThreadID threadID) {
100 if (fThreadIDs[i] == threadID) {
130 SkThreadID threadID(SkGetThreadID());
136 SkASSERTF(!fCurrentShared->find(threadID),
137 "Thread %" PRIx64 " already has an shared lock\n", threadID);
139 if (!fWaitingExclusive->tryAdd(threadID)) {
140 SkDEBUGFAILF("Thread %" PRIx64 " already has an exclusive lock\n", threadID);
159 SkThreadID threadID(SkGetThreadID());
166 if (!fWaitingExclusive->tryRemove(threadID)) {
167 SkDEBUGFAILF("Thread %" PRIx64 " did not have the lock held.\n", threadID);
186 SkThreadID threadID(SkGetThreadID());
189 SkASSERT(fWaitingExclusive->find(threadID));
193 SkThreadID threadID(SkGetThreadID());
200 if (!fWaitingShared->tryAdd(threadID)) {
201 SkDEBUGFAILF("Thread %" PRIx64 " was already waiting!\n", threadID);
204 if (!fCurrentShared->tryAdd(threadID)) {
205 SkDEBUGFAILF("Thread %" PRIx64 " already holds a shared lock!\n", threadID);
220 SkThreadID threadID(SkGetThreadID());
226 if (!fCurrentShared->tryRemove(threadID)) {
227 SkDEBUGFAILF("Thread %" PRIx64 " does not hold a shared lock.\n", threadID);
239 SkThreadID threadID(SkGetThreadID());
241 SkASSERT(fCurrentShared->find(threadID));