~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/thread_var.h

  • Committer: tdavies
  • Date: 2010-10-10 05:31:41 UTC
  • mto: (1827.1.3 trunk-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1829.
  • Revision ID: tdavies@molly-20101010053141-7rbcb8fe8a6xxrn8
Bug:621861 Changed C structs to C++ class in the following files: filesort.cc, filesort_info.h, sql_sort.h, table.h. removed the '_st' from the name of some of the classes. For more detail of changes made read the merge proposal notes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
29
28
namespace internal
30
29
{
31
30
 
 
31
static pthread_t wrapper_pthread_self()
 
32
{
 
33
  return pthread_self();
 
34
}
 
35
 
32
36
struct st_my_thread_var
33
37
{
34
 
  boost::condition_variable_any suspend;
 
38
  boost::condition_variable suspend;
35
39
  boost::mutex mutex;
36
40
  boost::mutex * volatile current_mutex;
37
 
  boost::condition_variable_any * volatile current_cond;
 
41
  boost::condition_variable * volatile current_cond;
 
42
  pthread_t pthread_self;
38
43
  uint64_t id;
39
44
  int volatile abort;
 
45
  struct st_my_thread_var *next,**prev;
40
46
  void *opt_info;
41
47
 
42
48
  st_my_thread_var() :
44
50
    current_cond(0),
45
51
    id(0),
46
52
    abort(false),
 
53
    next(0),
 
54
    prev(0),
47
55
    opt_info(0)
48
56
  { 
 
57
    pthread_self= wrapper_pthread_self();
49
58
  }
50
59
 
51
60
  ~st_my_thread_var()