Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
787 B

/*++
Copyright (c) 2001, Microsoft Corporation
Module Name:
tls.cpp
Abstract:
This file implements the TLS.
Author:
Revision History:
Notes:
--*/
#include "private.h"
#include "tls.h"
#include "cic.h"
#include "profile.h"
// static
BOOL TLS::InternalDestroyTLS()
{
if (dwTLSIndex == TLS_OUT_OF_INDEXES)
return FALSE;
TLS* ptls = (TLS*)TlsGetValue(dwTLSIndex);
if (ptls != NULL)
{
if (ptls->pCicBridge)
ptls->pCicBridge->Release();
if (ptls->pCicProfile)
ptls->pCicProfile->Release();
if (ptls->ptim)
ptls->ptim->Release();
cicMemFree(ptls);
TlsSetValue(dwTLSIndex, NULL);
return TRUE;
}
return FALSE;
}