Lines Matching refs:pTls
573 static void AddKeyToList( PTLS pTls ) in AddKeyToList() argument
575 if ( pTls ) in AddKeyToList()
579 pTls->pNext = g_pThreadKeyList; in AddKeyToList()
580 pTls->pPrev = 0; in AddKeyToList()
583 g_pThreadKeyList->pPrev = pTls; in AddKeyToList()
585 g_pThreadKeyList = pTls; in AddKeyToList()
591 static void RemoveKeyFromList( PTLS pTls ) in RemoveKeyFromList() argument
593 if ( pTls ) in RemoveKeyFromList()
596 if ( pTls->pPrev ) in RemoveKeyFromList()
597 pTls->pPrev->pNext = pTls->pNext; in RemoveKeyFromList()
600 OSL_ASSERT( pTls == g_pThreadKeyList ); in RemoveKeyFromList()
601 g_pThreadKeyList = pTls->pNext; in RemoveKeyFromList()
604 if ( pTls->pNext ) in RemoveKeyFromList()
605 pTls->pNext->pPrev = pTls->pPrev; in RemoveKeyFromList()
612 PTLS pTls; in _osl_callThreadKeyCallbackOnThreadDetach() local
615 pTls = g_pThreadKeyList; in _osl_callThreadKeyCallbackOnThreadDetach()
616 while ( pTls ) in _osl_callThreadKeyCallbackOnThreadDetach()
618 if ( pTls->pfnCallback ) in _osl_callThreadKeyCallbackOnThreadDetach()
620 void *pValue = (void*)*pTls->pulPtr; in _osl_callThreadKeyCallbackOnThreadDetach()
623 pTls->pfnCallback( pValue ); in _osl_callThreadKeyCallbackOnThreadDetach()
626 pTls = pTls->pNext; in _osl_callThreadKeyCallbackOnThreadDetach()
636 PTLS pTls = (PTLS)rtl_allocateMemory( sizeof(TLS) ); in osl_createThreadKey() local
638 if ( pTls ) in osl_createThreadKey()
640 pTls->pfnCallback = pCallback; in osl_createThreadKey()
641 if (DosAllocThreadLocalMemory(1, &pTls->pulPtr) != NO_ERROR) in osl_createThreadKey()
643 rtl_freeMemory( pTls ); in osl_createThreadKey()
644 pTls = 0; in osl_createThreadKey()
648 *pTls->pulPtr = 0; in osl_createThreadKey()
649 AddKeyToList( pTls ); in osl_createThreadKey()
653 return ((oslThreadKey)pTls); in osl_createThreadKey()
663 PTLS pTls = (PTLS)Key; in osl_destroyThreadKey() local
665 RemoveKeyFromList( pTls ); in osl_destroyThreadKey()
666 DosFreeThreadLocalMemory(pTls->pulPtr); in osl_destroyThreadKey()
667 rtl_freeMemory( pTls ); in osl_destroyThreadKey()
678 PTLS pTls = (PTLS)Key; in osl_getThreadKeyData() local
680 return ((void *) *pTls->pulPtr); in osl_getThreadKeyData()
693 PTLS pTls = (PTLS)Key; in osl_setThreadKeyData() local
697 if ( pTls->pfnCallback ) in osl_setThreadKeyData()
698 pOldData = (void*)*pTls->pulPtr; in osl_setThreadKeyData()
700 *pTls->pulPtr = (ULONG)pData; in osl_setThreadKeyData()
702 if ( fSuccess && pTls->pfnCallback && pOldData ) in osl_setThreadKeyData()
703 pTls->pfnCallback( pOldData ); in osl_setThreadKeyData()