Diffstat (limited to 'qmake/tools/qcriticalsection_p.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/tools/qcriticalsection_p.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/qmake/tools/qcriticalsection_p.cpp b/qmake/tools/qcriticalsection_p.cpp index 60fc8bd..c375730 100644 --- a/qmake/tools/qcriticalsection_p.cpp +++ b/qmake/tools/qcriticalsection_p.cpp | |||
@@ -1,75 +1,73 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Implementation of QCriticalSection class | 4 | ** Implementation of QCriticalSection class |
5 | ** | 5 | ** |
6 | ** Created : | ||
7 | ** | ||
8 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. |
9 | ** | 7 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 8 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 9 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 13 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 17 | ** packaging of this file. |
20 | ** | 18 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
24 | ** | 22 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 25 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 30 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 32 | ** not clear to you. |
35 | ** | 33 | ** |
36 | **********************************************************************/ | 34 | **********************************************************************/ |
37 | 35 | ||
38 | #if defined(QT_THREAD_SUPPORT) | 36 | #if defined(QT_THREAD_SUPPORT) |
39 | 37 | ||
40 | #include "qt_windows.h" | 38 | #include "qt_windows.h" |
41 | 39 | ||
42 | #include <private/qcriticalsection_p.h> | 40 | #include <private/qcriticalsection_p.h> |
43 | 41 | ||
44 | class QCriticalSectionPrivate | 42 | class QCriticalSectionPrivate |
45 | { | 43 | { |
46 | public: | 44 | public: |
47 | QCriticalSectionPrivate() {} | 45 | QCriticalSectionPrivate() {} |
48 | 46 | ||
49 | CRITICAL_SECTION section; | 47 | CRITICAL_SECTION section; |
50 | }; | 48 | }; |
51 | 49 | ||
52 | 50 | ||
53 | QCriticalSection::QCriticalSection() | 51 | QCriticalSection::QCriticalSection() |
54 | { | 52 | { |
55 | d = new QCriticalSectionPrivate; | 53 | d = new QCriticalSectionPrivate; |
56 | InitializeCriticalSection( &d->section ); | 54 | InitializeCriticalSection( &d->section ); |
57 | } | 55 | } |
58 | 56 | ||
59 | QCriticalSection::~QCriticalSection() | 57 | QCriticalSection::~QCriticalSection() |
60 | { | 58 | { |
61 | DeleteCriticalSection( &d->section ); | 59 | DeleteCriticalSection( &d->section ); |
62 | delete d; | 60 | delete d; |
63 | } | 61 | } |
64 | 62 | ||
65 | void QCriticalSection::enter() | 63 | void QCriticalSection::enter() |
66 | { | 64 | { |
67 | EnterCriticalSection( &d->section ); | 65 | EnterCriticalSection( &d->section ); |
68 | } | 66 | } |
69 | 67 | ||
70 | void QCriticalSection::leave() | 68 | void QCriticalSection::leave() |
71 | { | 69 | { |
72 | LeaveCriticalSection( &d->section ); | 70 | LeaveCriticalSection( &d->section ); |
73 | } | 71 | } |
74 | 72 | ||
75 | #endif | 73 | #endif |