CUBRID Engine  latest
thread_compat.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 /*
20  * thread_compat - interface for compatibility with cubrid projects.
21  *
22  * NOTE - normally thread module belongs to server stand-alone projects. however, some functions may require thread
23  * entries on server module, but are also used on client module
24  */
25 
26 #ifndef _THREAD_COMPAT_HPP_
27 #define _THREAD_COMPAT_HPP_
28 
29 // forward definition for THREAD_ENTRY
30 #if defined (SERVER_MODE) || (defined (SA_MODE) && defined (__cplusplus))
31 #include <thread>
32 #ifndef _THREAD_ENTRY_HPP_
33 namespace cubthread
34 {
35  class entry;
36 } // namespace cubthread
39 #endif // _THREAD_ENTRY_HPP_
40 
41 #else // not SERVER_MODE and not SA_MODE-C++
42 // client or SA_MODE annoying grammars
43 typedef void THREAD_ENTRY;
44 typedef unsigned long int thread_id_t;
45 #endif // not SERVER_MODE and not SA_MODE
46 
47 #endif // _THREAD_COMPAT_HPP_
unsigned long int thread_id_t
void THREAD_ENTRY