~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/query_id.h

Small fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_GLOBAL_QUERY_ID_H
21
 
#define DRIZZLED_GLOBAL_QUERY_ID_H
 
20
#ifndef DRIZZLED_QUERY_ID_H
 
21
#define DRIZZLED_QUERY_ID_H
22
22
 
23
23
#include <pthread.h>
 
24
#include <drizzled/atomics.h>
24
25
 
25
26
class Query_id
26
27
{
38
39
  query_id_t next();
39
40
 
40
41
private:
41
 
  pthread_mutex_t LOCK_query_id;
42
 
  query_id_t the_query_id;
 
42
  drizzled::atomic<uint64_t> the_query_id;
43
43
 
44
44
  Query_id();
45
45
  Query_id(Query_id const&);
46
46
  Query_id& operator=(Query_id const&);
47
47
};
48
48
 
49
 
#endif
 
49
#endif /* DRIZZLED_QUERY_ID_H */