1 /* ///////////////////////////////////////////////////////////////////////
2 * File: lock_selector.h
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
13 #ifndef EXTL_PLATFORM_SYNCH_LOCK_SELECTOR_H
14 #define EXTL_PLATFORM_SYNCH_LOCK_SELECTOR_H
17 # error lock_selector.h need be supported by c++.
20 /* ///////////////////////////////////////////////////////////////////////
23 #include "../platform.h"
24 #include "../../synch/null_lock.h"
26 #if defined(EXTL_PLATFORM_IS_WIN) && \
27 !defined(EXTL_WIN_NO_SUPPORT)
28 # include "../../win/synch/locks.h"
30 #elif defined(EXTL_PLATFORM_IS_UNIX) && \
31 !defined(EXTL_UNIX_NO_SUPPORT)
32 # error locks.h have not be implemented.
34 # error Unknown Platform.
37 /* ///////////////////////////////////////////////////////////////////////
38 * ::extl::platform namespace
40 EXTL_PLATFORM_BEGIN_WHOLE_NAMESPACE
42 /* ///////////////////////////////////////////////////////////////////////
47 * critical_section_lock
53 #if defined(EXTL_PLATFORM_IS_WIN)
54 typedef critical_section_lock lock_type
;
55 #elif defined(EXTL_PLATFORM_IS_UNIX)
56 typedef null_lock lock_type
;
58 # error Unknown Platform.
63 /* ///////////////////////////////////////////////////////////////////////
64 * ::extl::platform namespace
66 EXTL_PLATFORM_END_WHOLE_NAMESPACE
68 /* //////////////////////////////////////////////////////////////////// */
69 #endif /* EXTL_PLATFORM_SYNCH_LOCK_SELECTOR_H */
70 /* //////////////////////////////////////////////////////////////////// */