AnimatLab
2
Test
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
StdCriticalSection.cpp
Go to the documentation of this file.
1
7
// CStdCriticalSection
9
//
10
// A ::TryEnterCriticalSection type thing that works on 9x
11
//
12
// Written by Olan Patrick Barnes (patrick@mfcfree.com)
13
// Copyright (c) 2001 Olan Patrick Barnes
14
//
15
// This code may be used in compiled form in any way you desire. This
16
// file may be redistributed by any means PROVIDING it is
17
// not sold for profit without the authors written consent, and
18
// providing that this notice and the authors name is included.
19
//
20
// This file is provided "as is" with no expressed or implied warranty.
21
// The author accepts no liability if it causes any damage to you or your
22
// computer whatsoever.
23
//
24
// Description:
25
//
26
// ::TryEnterCriticalSection() is only available on NT platforms, and you
27
// may need to support 9x. This is a custom critical section class that
28
// allows for "try-enter" logic. It operates 100% in user mode (this
29
// class does not use expensive kernel objects), making use of the
30
// ::InterlockedExchange() and ::GetCurrentThreadId() API's.
31
//
33
34
#include "StdAfx.h"
35
#include "StdCriticalSectionInternal.h"
36
37
namespace
StdUtils
38
{
39
46
CStdCriticalSection::CStdCriticalSection
()
47
{
48
}
49
59
CStdCriticalSection::~CStdCriticalSection
()
60
{
61
//Leave(); //lint !e534
62
}
63
64
CStdCriticalSection
STD_UTILS_PORT *Std_GetCriticalSection()
65
{
66
return
new
CStdCriticalSectionInternal
;
67
}
68
69
70
}
//StdUtils
71
StdUtils::CStdCriticalSection::CStdCriticalSection
CStdCriticalSection()
Default constructor.
Definition:
StdCriticalSection.cpp:46
StdUtils::CStdCriticalSectionInternal
Standard critical section.
Definition:
StdCriticalSectionInternal.h:50
StdUtils
Namespace for the standard utility objects.
Definition:
MarkupSTL.cpp:19
StdUtils::CStdCriticalSection
Standard critical section.
Definition:
StdCriticalSection.h:50
StdUtils::CStdCriticalSection::~CStdCriticalSection
~CStdCriticalSection()
Destructor.
Definition:
StdCriticalSection.cpp:59
Libraries
StdUtils
StdCriticalSection.cpp
Generated on Tue Sep 29 2015 07:07:21 for AnimatLab by
1.8.10