wibble
1.1
Main Page
Namespaces
Classes
Files
File List
File Members
wibble
sys
lockfile.test.h
Go to the documentation of this file.
1
/* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net>
2
(c) 2007 Enrico Zini <enrico@enricozini.org> */
3
#include <
wibble/sys/lockfile.h
>
4
#include <cstdlib>
5
#include <set>
6
7
#include <
wibble/test.h
>
8
9
using namespace
std;
10
using namespace
wibble::sys::fs;
11
12
struct
TestLockfile
{
13
// Cannot test the locks without forking, as reacquiring the lock from the
14
// same process is just an update of the previous lock
15
Test
readlock
() {
16
#ifdef POSIX
17
Lockfile
lk1(
"testlock"
,
false
);
18
#endif
19
}
20
21
Test
writelock
() {
22
#ifdef POSIX
23
Lockfile
lk1(
"testlock"
,
true
);
24
#endif
25
}
26
};
27
28
// vim:set ts=4 sw=4:
Generated on Wed Oct 23 2013 17:14:25 for wibble by
1.8.4