~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/query_id.h

  • Committer: Monty Taylor
  • Date: 2009-03-04 02:48:12 UTC
  • mto: (917.1.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 918.
  • Revision ID: mordred@inaugust.com-20090304024812-5wb6wpye5c1iitbq
Applied atomic patch to current tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef DRIZZLED_GLOBAL_QUERY_ID_H
21
21
#define DRIZZLED_GLOBAL_QUERY_ID_H
22
22
 
 
23
#include <drizzled/atomics.h>
 
24
 
23
25
#include <pthread.h>
24
26
 
25
27
class Query_id
38
40
  query_id_t next();
39
41
 
40
42
private:
41
 
  pthread_mutex_t LOCK_query_id;
42
 
  query_id_t the_query_id;
 
43
  tbb::atomic<query_id_t> the_query_id;
43
44
 
44
45
  Query_id();
45
46
  Query_id(Query_id const&);