~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/current_session.cc

  • Committer: Brian Aker
  • Date: 2010-09-20 00:00:20 UTC
  • Revision ID: brian@tangent.org-20100920000020-s6x30brpajr83pkr
Update session/memory to use boost specific.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
namespace drizzled
26
26
{
27
27
 
28
 
extern pthread_key_t THR_Session;
29
 
extern pthread_key_t THR_Mem_root;
 
28
static MySessionVar THR_Session;
 
29
static MyMemoryRootVar THR_Mem_root;
 
30
 
 
31
MySessionVar &currentSession(void)
 
32
{
 
33
  return THR_Session;
 
34
}
 
35
 
 
36
MyMemoryRootVar &currentMemRoot(void)
 
37
{
 
38
  return THR_Mem_root;
 
39
}
30
40
 
31
41
Session *_current_session(void)
32
42
{
33
 
  return static_cast<Session *>(pthread_getspecific(THR_Session));
 
43
  return THR_Session.get();
34
44
}
35
45
 
36
 
 
37
46
memory::Root *current_mem_root(void)
38
47
{
39
 
  return *(static_cast<memory::Root **>(pthread_getspecific(THR_Mem_root)));
 
48
  return *(currentMemRoot().get());
40
49
}
41
50
 
42
51
} /* namespace drizzled */