00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #pragma once
00019
00020 #include <pthread.h>
00021 #include <boost/thread/recursive_mutex.hpp>
00022 #include <boost/thread/mutex.hpp>
00023 #include <boost/thread/shared_mutex.hpp>
00024 #include <boost/thread/condition_variable.hpp>
00025
00026 namespace drizzled
00027 {
00028 namespace internal
00029 {
00030
00031 struct st_my_thread_var
00032 {
00033 boost::condition_variable_any suspend;
00034 boost::mutex mutex;
00035 boost::mutex * volatile current_mutex;
00036 boost::condition_variable_any * volatile current_cond;
00037 uint64_t id;
00038 int volatile abort;
00039 void *opt_info;
00040
00041 st_my_thread_var() :
00042 current_mutex(0),
00043 current_cond(0),
00044 id(0),
00045 abort(false),
00046 opt_info(0)
00047 {
00048 }
00049
00050 ~st_my_thread_var()
00051 {
00052 }
00053 };
00054
00055 extern struct st_my_thread_var *_my_thread_var(void);
00056 #define my_thread_var (::drizzled::internal::_my_thread_var())
00057
00058 }
00059 }
00060