inline void* CThreadSlotData::GetThreadValue(int nSlot){ EnterCriticalSection(&m_sect); ASSERT(nSlot != 0 && nSlot < m_nMax); ASSERT(m_pSlotData != NULL); ASSERT(m_pSlotData[nSlot].dwFlags & SLOT_USED); ASSERT(m_tlsIndex != (DWORD)-1); if( nSlot <= 0 || nSlot >= m_nMax ) // check for retail builds. { LeaveCriticalSection(&m_sect); return NULL; }
CThreadData* pData = (CThreadData*)TlsGetValue(m_tlsIndex); if (pData == NULL || nSlot >= pData->nCount) { LeaveCriticalSection(&m_sect); return NULL; } void* pRetVal = pData->pData[nSlot]; LeaveCriticalSection(&m_sect); return pRetVal;}

线程跑到return pRetVal;就中断掉了  不知道该怎么样调试

posted on 2011-05-20 14:57  30斤大番薯  阅读(2858)  评论(1编辑  收藏  举报