repo.or.cz
/
cinelerra_cv
/
ct.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git]
/
guicast
/
bccounter.C
blob
f78a861adcc1f817e6d8c707366c12df56928438
1
#include "bccounter.h"
2
#include "mutex.h"
3
4
BCCounter::BCCounter()
5
{
6
value = 0;
7
mutex = new Mutex;
8
}
9
10
BCCounter::~BCCounter()
11
{
12
delete mutex;
13
}
14
15
void BCCounter::up()
16
{
17
mutex->lock("BCCounter::up");
18
value++;
19
printf("BCCounter::up %p %d\n", this, value);
20
mutex->unlock();
21
}
22
23
void BCCounter::down()
24
{
25
mutex->lock("BCCounter::down");
26
value--;
27
printf("BCCounter::down %p %d\n", this, value);
28
mutex->unlock();
29
}
30
/*
31
// Local Variables:
32
// mode: C++
33
// c-file-style: "linux"
34
// End:
35
*/