~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/thr_lock.h

  • Committer: lbieber
  • Date: 2010-10-01 12:16:18 UTC
  • mfrom: (1802.1.1 fix-bug-651256)
  • Revision ID: lbieber@orisndriz08-20101001121618-uqcboygpjwbiglem
Merge Vijay - fix bug 651256 - Remove --help-extended

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
/* For use with thr_locks */
17
17
 
19
19
#define DRIZZLED_THR_LOCK_H
20
20
 
21
21
#include <boost/thread/mutex.hpp>
22
 
#include <boost/thread/shared_mutex.hpp>
23
22
#include <boost/thread/condition_variable.hpp>
24
 
 
25
 
#include "drizzled/visibility.h"
 
23
#include <pthread.h>
26
24
 
27
25
namespace drizzled
28
26
{
75
73
 
76
74
struct THR_LOCK_INFO
77
75
{
 
76
  pthread_t thread;
78
77
  uint64_t thread_id;
79
78
  uint32_t n_cursors;
80
79
 
81
80
  THR_LOCK_INFO() : 
 
81
    thread(0),
82
82
    thread_id(0),
83
83
    n_cursors(0)
84
84
  { }
106
106
struct THR_LOCK;
107
107
struct THR_LOCK_DATA;
108
108
 
109
 
struct DRIZZLED_API THR_LOCK_DATA {
 
109
struct THR_LOCK_DATA {
110
110
  THR_LOCK_OWNER *owner;
111
111
  struct THR_LOCK_DATA *next,**prev;
112
112
  struct THR_LOCK *lock;
113
 
  boost::condition_variable_any *cond;
 
113
  boost::condition_variable *cond;
114
114
  enum thr_lock_type type;
115
115
  void *status_param;                   /* Param to status functions */
116
116
 
184
184
  }
185
185
};
186
186
 
187
 
class Session; 
188
187
 
189
188
#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,
 
189
void thr_lock_info_init(THR_LOCK_INFO *info);
 
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
193
void thr_multi_unlock(THR_LOCK_DATA **data,uint32_t count);
194
194