~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/current_session.h

Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
 
21
 
#ifndef DRIZZLED_CURRENT_SESSION_H
22
 
#define DRIZZLED_CURRENT_SESSION_H
 
21
#pragma once
23
22
 
24
23
#include <pthread.h>
25
24
#include <boost/thread/tss.hpp>
26
 
 
27
 
namespace drizzled
28
 
{
29
 
 
30
 
class Session;
31
 
 
32
 
namespace memory { class Root; }
33
 
 
34
 
Session *_current_session(void);
 
25
#include <drizzled/common_fwd.h>
 
26
#include <drizzled/visibility.h>
 
27
 
 
28
namespace drizzled {
 
29
 
 
30
DRIZZLED_API Session *_current_session();
35
31
#define current_session ::drizzled::_current_session()
36
 
memory::Root *current_mem_root(void);
 
32
memory::Root *current_mem_root();
37
33
 
38
34
typedef boost::thread_specific_ptr<Session> MySessionVar;
39
35
typedef boost::thread_specific_ptr<memory::Root *> MyMemoryRootVar;
40
36
 
41
 
MySessionVar &currentSession(void);
42
 
MyMemoryRootVar &currentMemRoot(void);
 
37
MySessionVar &currentSession();
 
38
MyMemoryRootVar &currentMemRoot();
43
39
 
44
40
} /* namespace drizzled */
45
 
 
46
 
#endif /* DRIZZLED_CURRENT_SESSION_H */