aboutsummaryrefslogtreecommitdiff
path: root/common/session/custom/session.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-01-16 16:31:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-01-16 16:31:29 +0200
commit856a438b33184959b64864f1afdf5a6a2fd6b0d2 (patch)
treeb1fd1d9c616262d8d62e4431469f74e5e74d4fe1 /common/session/custom/session.cxx
parent5cf30ccfe764701f549e4152ad312187221f5285 (diff)
Make session cache management functions static, add notifications
Diffstat (limited to 'common/session/custom/session.cxx')
-rw-r--r--common/session/custom/session.cxx23
1 files changed, 5 insertions, 18 deletions
diff --git a/common/session/custom/session.cxx b/common/session/custom/session.cxx
index b50493f..f8cd102 100644
--- a/common/session/custom/session.cxx
+++ b/common/session/custom/session.cxx
@@ -6,33 +6,20 @@
#include "session.hxx"
-static session* current_; // Use TLS in multi-threaded applications.
+session* session::current;
session::
session ()
{
- assert (current_ == 0);
- current_ = this;
+ assert (current == 0);
+ current = this;
}
session::
~session ()
{
- assert (current_ == this);
- current_ = 0;
-}
-
-bool session::
-has_current ()
-{
- return current_ != 0;
-}
-
-session& session::
-current ()
-{
- assert (current_ != 0);
- return *current_;
+ assert (current == this);
+ current = 0;
}
void session::