Source code of Windows XP (NT5)
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.

39 lines
444 B

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. STLLOCK.CPP
  5. Abstract:
  6. Lock for STL
  7. History:
  8. --*/
  9. #include "precomp.h"
  10. //#include <stdio.h>
  11. //#include <wbemcomn.h>
  12. #include <sync.h>
  13. /*
  14. This file implements the STL lockit class to avoid linking to msvcprt.dll
  15. */
  16. CCritSec g_cs;
  17. std::_Lockit::_Lockit()
  18. {
  19. EnterCriticalSection(&g_cs);
  20. }
  21. std::_Lockit::~_Lockit()
  22. {
  23. LeaveCriticalSection(&g_cs);
  24. }