Lines Matching defs:thread
173 thread_id thread = -1;
175 if (IsWriteLocked(&stack_base, &thread)) {
201 //record thread information
202 fWriterThread = thread;
308 /* this function demonstrates a nice method of determining if the current thread */
310 /* where the thread's stack is located. Each time a new writer acquires the lock, */
312 /* current thread and sees if it is a match. If the stack_page matches you are guaranteed */
313 /* to have the matching thread. If the stack page doesn't match the more traditional */
317 /* It could be expanded to cache the information of the last thread in the lock, and then if */
318 /* the same thread returns while there is no one in the lock, it could save some time, if the */
319 /* same thread is likely to acquire the lock again and again. */
341 thread_id thread = 0;
353 thread = find_thread(NULL);
354 if (fWriterThread == thread) {
364 *the_thread = thread;
386 thread_id thread = find_thread(NULL);
387 if (fDebugArray[thread % fMaxThreads] > 0) locked = true;
399 /* this array does not need to be locked because each running thread */
404 /* array. If register thread is ever called and the count is not 0 then */
424 thread_id thread = find_thread(NULL);
426 ASSERT_WITH_MESSAGE(fDebugArray[thread%fMaxThreads] == 0,"Nested ReadLock!\n");
427 fDebugArray[thread%fMaxThreads]++;
447 thread_id thread = find_thread(NULL);
449 ASSERT(fDebugArray[thread%fMaxThreads] == 1);
450 fDebugArray[thread%fMaxThreads]--;