xref: /haiku/headers/private/userlandfs/shared/Locker.h (revision 16d5c24e533eb14b7b8a99ee9f3ec9ba66335b1e)
1 /*
2  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef	_USERLAND_FS_LOCKER_H
6 #define	_USERLAND_FS_LOCKER_H
7 
8 #ifdef _KERNEL_MODE
9 	// kernel: use the RecursiveLock class
10 
11 
12 #include "RecursiveLock.h"
13 
14 
15 namespace UserlandFSUtil {
16 	typedef RecursiveLock Locker;
17 };
18 
19 
20 #else
21 	// userland: use the BLocker class
22 
23 #include <Locker.h>
24 
25 namespace UserlandFSUtil {
26 	typedef BLocker Locker;
27 };
28 
29 #endif	// kernel/userland
30 
31 using UserlandFSUtil::Locker;
32 
33 #endif	// _USERLAND_FS_LOCKER_H
34