~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/current_session.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:
21
21
#ifndef DRIZZLED_CURRENT_SESSION_H
22
22
#define DRIZZLED_CURRENT_SESSION_H
23
23
 
24
 
#include <pthread.h>
25
 
#include <boost/thread/tss.hpp>
26
 
 
27
 
namespace drizzled
28
 
{
29
 
 
30
24
class Session;
31
25
 
32
 
namespace memory { class Root; }
33
 
 
34
26
Session *_current_session(void);
35
 
#define current_session ::drizzled::_current_session()
36
 
memory::Root *current_mem_root(void);
37
 
 
38
 
typedef boost::thread_specific_ptr<Session> MySessionVar;
39
 
typedef boost::thread_specific_ptr<memory::Root *> MyMemoryRootVar;
40
 
 
41
 
MySessionVar &currentSession(void);
42
 
MyMemoryRootVar &currentMemRoot(void);
43
 
 
44
 
} /* namespace drizzled */
 
27
#define current_session _current_session()
 
28
MEM_ROOT *current_mem_root(void);
 
29
MEM_ROOT **current_mem_root_ptr(void);
45
30
 
46
31
#endif /* DRIZZLED_CURRENT_SESSION_H */