~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/thr_lock.h

  • Committer: Brian Aker
  • Date: 2010-10-20 20:25:52 UTC
  • mto: (1864.2.1 merge)
  • mto: This revision was merged to the branch mainline in revision 1865.
  • Revision ID: brian@tangent.org-20101020202552-51y5sz5ledoxbp7t
Add support for --with-valgrind

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <boost/thread/mutex.hpp>
22
22
#include <boost/thread/shared_mutex.hpp>
23
23
#include <boost/thread/condition_variable.hpp>
 
24
#include <pthread.h>
24
25
 
25
26
namespace drizzled
26
27
{
73
74
 
74
75
struct THR_LOCK_INFO
75
76
{
 
77
  pthread_t thread;
76
78
  uint64_t thread_id;
77
79
  uint32_t n_cursors;
78
80
 
79
81
  THR_LOCK_INFO() : 
 
82
    thread(0),
80
83
    thread_id(0),
81
84
    n_cursors(0)
82
85
  { }
182
185
  }
183
186
};
184
187
 
185
 
class Session; 
186
188
 
187
189
#define thr_lock_owner_init(owner, info_arg) (owner)->info= (info_arg)
188
190
void thr_lock_init(THR_LOCK *lock);
189
 
enum enum_thr_lock_result thr_multi_lock(Session &session, THR_LOCK_DATA **data,
 
191
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
190
192
                                         uint32_t count, THR_LOCK_OWNER *owner);
191
 
void thr_multi_unlock(THR_LOCK_DATA **data,uint32_t count);
192
193
 
193
194
} /* namespace drizzled */
194
195