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

  1. /*++
  2. Copyright (c) 2001, Microsoft Corporation
  3. Module Name:
  4. tls.cpp
  5. Abstract:
  6. This file implements the TLS.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #include "private.h"
  12. #include "tls.h"
  13. #include "cic.h"
  14. #include "profile.h"
  15. // static
  16. BOOL TLS::InternalDestroyTLS()
  17. {
  18. if (dwTLSIndex == TLS_OUT_OF_INDEXES)
  19. return FALSE;
  20. TLS* ptls = (TLS*)TlsGetValue(dwTLSIndex);
  21. if (ptls != NULL)
  22. {
  23. if (ptls->pCicBridge)
  24. ptls->pCicBridge->Release();
  25. if (ptls->pCicProfile)
  26. ptls->pCicProfile->Release();
  27. if (ptls->ptim)
  28. ptls->ptim->Release();
  29. cicMemFree(ptls);
  30. TlsSetValue(dwTLSIndex, NULL);
  31. return TRUE;
  32. }
  33. return FALSE;
  34. }