~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/thread_var.h

  • Committer: Brian Aker
  • Date: 2010-08-09 18:04:12 UTC
  • mfrom: (1689.3.7 staging)
  • Revision ID: brian@gaz-20100809180412-olurwh51ojllev6p
Merge in heap conversion, and case insensitive patch, and remove need for
M_HASH in session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* Defines to make different thread packages compatible */
17
17
 
21
21
#include <pthread.h>
22
22
#include <boost/thread/recursive_mutex.hpp>
23
23
#include <boost/thread/mutex.hpp>
24
 
#include <boost/thread/shared_mutex.hpp>
25
24
#include <boost/thread/condition_variable.hpp>
26
25
 
27
26
namespace drizzled
31
30
 
32
31
struct st_my_thread_var
33
32
{
34
 
  boost::condition_variable_any suspend;
35
 
  boost::mutex mutex;
36
 
  boost::mutex * volatile current_mutex;
37
 
  boost::condition_variable_any * volatile current_cond;
 
33
  pthread_cond_t suspend;
 
34
  pthread_mutex_t mutex;
 
35
  pthread_mutex_t * volatile current_mutex;
 
36
  pthread_cond_t * volatile current_cond;
 
37
  pthread_t pthread_self;
38
38
  uint64_t id;
39
39
  int volatile abort;
 
40
  bool init;
 
41
  struct st_my_thread_var *next,**prev;
40
42
  void *opt_info;
41
 
 
42
 
  st_my_thread_var() :
43
 
    current_mutex(0),
44
 
    current_cond(0),
45
 
    id(0),
46
 
    abort(false),
47
 
    opt_info(0)
48
 
  { 
49
 
  }
50
 
 
51
 
  ~st_my_thread_var()
52
 
  {
53
 
  }
54
43
};
55
44
 
56
45
extern struct st_my_thread_var *_my_thread_var(void);