Loading [MathJax]/extensions/tex2jax.js
ROOT
6.08/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
2
3
<
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
2
3
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
v
x
+
Enumerations
a
d
e
f
g
h
m
p
t
v
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
u
v
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
v
w
x
y
z
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
core
thread
inc
TAtomicCountWin32.h
Go to the documentation of this file.
1
// @(#)root/thread:$Id$
2
// Author: Fons Rademakers 14/11/06
3
4
/*************************************************************************
5
* Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_TAtomicCountWin32
13
#define ROOT_TAtomicCountWin32
14
15
//////////////////////////////////////////////////////////////////////////
16
// //
17
// TAtomicCountWin32 //
18
// //
19
// Class providing atomic operations on a long. Setting, getting, //
20
// incrementing and decrementing are atomic, thread safe, operations. //
21
// //
22
// This implementation uses the Win32 InterLocked API for locking. //
23
// //
24
// ATTENTION: Don't use this file directly, it is included by //
25
// TAtomicCount.h. //
26
// //
27
//////////////////////////////////////////////////////////////////////////
28
29
# include "
Windows4Root.h
"
30
31
class
TAtomicCount
{
32
private
:
33
Long_t
fCnt
;
// counter
34
35
TAtomicCount
(
const
TAtomicCount
&);
// not implemented
36
TAtomicCount
&
operator=
(
const
TAtomicCount
&);
// not implemented
37
38
public
:
39
explicit
TAtomicCount
(
Long_t
v
) : fCnt(v) { }
40
void
operator++
() { InterlockedIncrement(&fCnt); }
41
Long_t
operator--
() {
return
InterlockedDecrement(&fCnt); }
42
operator
long()
const
{
return
static_cast<
long
const
volatile
&
>
(
fCnt
); }
43
void
Set
(
Long_t
v
) { fCnt =
v
; }
44
Long_t
Get
()
const
{
return
static_cast<
long
const
volatile
&
>
(
fCnt
); }
45
};
46
47
#endif
TAtomicCount::operator--
Long_t operator--()
Definition:
TAtomicCountWin32.h:41
TAtomicCount::Get
Long_t Get() const
Definition:
TAtomicCountWin32.h:44
TAtomicCount
Definition:
TAtomicCount.h:71
Windows4Root.h
v
SVector< double, 2 > v
Definition:
Dict.h:5
TAtomicCount::Set
void Set(Long_t v)
Definition:
TAtomicCountWin32.h:43
TAtomicCount::TAtomicCount
TAtomicCount(Long_t v)
Definition:
TAtomicCountWin32.h:39
Long_t
long Long_t
Definition:
RtypesCore.h:50
TAtomicCount::fCnt
Long_t fCnt
Definition:
TAtomicCount.h:73
TAtomicCount::operator=
TAtomicCount & operator=(const TAtomicCount &)
TAtomicCount::TAtomicCount
TAtomicCount(const TAtomicCount &)
TAtomicCount::operator++
void operator++()
Definition:
TAtomicCountWin32.h:40