~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/current_session.h

Merge Monty - Added inter-plugin dependencies for controlling plugin load order

Show diffs side-by-side

added added

removed removed

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