diff options
author | lloyd <[email protected]> | 2006-06-25 15:23:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-25 15:23:19 +0000 |
commit | 7a259add43ce9ad6ea30fcbb77ac7bca932db211 (patch) | |
tree | c1d4857694ddd3bc4709c54337cd8fa76669e6c5 /include | |
parent | a495fd2e01430a74833d667b6fec0a2cc4b23be5 (diff) |
Support named mutexes outside of the global library state.
Alter the AEP engine to use one in favor of a static Mutex pointer.
Fix a stupid typo in an exception message.
Diffstat (limited to 'include')
-rw-r--r-- | include/libstate.h | 3 | ||||
-rw-r--r-- | include/mutex.h | 20 |
2 files changed, 18 insertions, 5 deletions
diff --git a/include/libstate.h b/include/libstate.h index 9cb9f81d5..b2879c7d9 100644 --- a/include/libstate.h +++ b/include/libstate.h @@ -51,6 +51,7 @@ class Library_State void add_engine(class Engine*); class Mutex* get_mutex() const; + class Mutex* get_named_mutex(const std::string&); void set_x509_state(class X509_GlobalState*); class X509_GlobalState& x509_state(); @@ -58,6 +59,7 @@ class Library_State void set_transcoder(class Charset_Transcoder*); std::string transcode(const std::string, Character_Set, Character_Set) const; + void set_default_policy(); Library_State(class Mutex_Factory*); ~Library_State(); @@ -66,7 +68,6 @@ class Library_State Library_State& operator=(const Library_State&) { return (*this); } class Engine* get_engine_n(u32bit) const; - void set_default_policy(); class Mutex_Factory* mutex_factory; class Timer* timer; diff --git a/include/mutex.h b/include/mutex.h index 30e7b231f..48d1ea637 100644 --- a/include/mutex.h +++ b/include/mutex.h @@ -22,6 +22,16 @@ class Mutex }; /************************************************* +* Mutex Factory * +*************************************************/ +class Mutex_Factory + { + public: + virtual Mutex* make(); + virtual ~Mutex_Factory() {} + }; + +/************************************************* * Mutex Holding Class * *************************************************/ class Mutex_Holder @@ -34,13 +44,15 @@ class Mutex_Holder }; /************************************************* -* Mutex Factory * +* Named Mutex Holder * *************************************************/ -class Mutex_Factory +class Named_Mutex_Holder { public: - virtual Mutex* make(); - virtual ~Mutex_Factory() {} + Named_Mutex_Holder(const std::string&); + ~Named_Mutex_Holder(); + private: + const std::string mutex_name; }; } |