~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/thr_lock.h

  • Committer: Joseph Daly
  • Date: 2010-10-30 01:01:48 UTC
  • mfrom: (1891 staging)
  • mto: This revision was merged to the branch mainline in revision 1900.
  • Revision ID: skinny.moey@gmail.com-20101030010148-k39lnrftv4bkbux9
merge trunk

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
 
 
25
 
#include <drizzled/visibility.h>
 
24
#include <pthread.h>
26
25
 
27
26
namespace drizzled
28
27
{
75
74
 
76
75
struct THR_LOCK_INFO
77
76
{
 
77
  pthread_t thread;
78
78
  uint64_t thread_id;
79
79
  uint32_t n_cursors;
80
80
 
81
81
  THR_LOCK_INFO() : 
 
82
    thread(0),
82
83
    thread_id(0),
83
84
    n_cursors(0)
84
85
  { }
106
107
struct THR_LOCK;
107
108
struct THR_LOCK_DATA;
108
109
 
109
 
struct DRIZZLED_API THR_LOCK_DATA {
 
110
struct THR_LOCK_DATA {
110
111
  THR_LOCK_OWNER *owner;
111
112
  struct THR_LOCK_DATA *next,**prev;
112
113
  struct THR_LOCK *lock;
184
185
  }
185
186
};
186
187
 
187
 
class Session; 
188
188
 
189
189
#define thr_lock_owner_init(owner, info_arg) (owner)->info= (info_arg)
190
 
DRIZZLED_API void thr_lock_init(THR_LOCK *lock);
191
 
enum enum_thr_lock_result thr_multi_lock(Session &session, THR_LOCK_DATA **data,
 
190
void thr_lock_init(THR_LOCK *lock);
 
191
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
192
192
                                         uint32_t count, THR_LOCK_OWNER *owner);
193
 
void thr_multi_unlock(THR_LOCK_DATA **data,uint32_t count);
194
193
 
195
194
} /* namespace drizzled */
196
195