diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-13 01:56:29 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:39 -0500 |
commit | 59e7685d8d812ee8773f57475cbe3aa2a0bdfc81 (patch) | |
tree | 53480ab5b66d461f74b7a9a82925c213626cc9fb /sal | |
parent | 38ce15ce478d33772c5dd2fa8aece417d89d2861 (diff) |
Create an abstract interface to be used to implement a SolarMutex
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/osl/mutex.hxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sal/inc/osl/mutex.hxx b/sal/inc/osl/mutex.hxx index 3eb4c58a62c6..ba4d98dac763 100644 --- a/sal/inc/osl/mutex.hxx +++ b/sal/inc/osl/mutex.hxx @@ -247,6 +247,29 @@ namespace osl typedef Guard<Mutex> MutexGuard; typedef ClearableGuard<Mutex> ClearableMutexGuard; typedef ResettableGuard< Mutex > ResettableMutexGuard; + + /** SolarMutex interface, needed for SolarMutex. + Deprecated, used just for Application::GetSolarMutex(). + */ + class SolarMutex + { + public: + /** Blocks if mutex is already in use + */ + virtual void SAL_CALL acquire() = 0; + + /** Tries to get the mutex without blocking. + */ + virtual sal_Bool SAL_CALL tryToAcquire() = 0; + + /** Releases the mutex. + */ + virtual void SAL_CALL release() = 0; + + protected: + SolarMutex() {} + virtual ~SolarMutex() {} + }; } #endif /* __cplusplus */ |