From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/stable/mutex.h | 94 +++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'src/stable/mutex.h') diff --git a/src/stable/mutex.h b/src/stable/mutex.h index 1898118..23963e3 100644 --- a/src/stable/mutex.h +++ b/src/stable/mutex.h @@ -12,57 +12,57 @@ namespace Bu { - /** - * Simple mutex wrapper. Currently this doesn't do anything extra for you - * except keep all of the functionality together in an OO sorta' way and - * keep you from having to worry about cleaning up your mutexes properly, - * or initing them. - *@ingroup Threading - */ - class Mutex - { - public: - /** - * Create an unlocked mutex. - */ - Mutex(); - - /** - * Destroy a mutex. This can only be done when a mutex is unlocked. - * Failure to unlock before destroying a mutex object could cause it to - * wait for the mutex to unlock, the odds of which are usually farily - * low at deconstruction time. - */ - ~Mutex(); + /** + * Simple mutex wrapper. Currently this doesn't do anything extra for you + * except keep all of the functionality together in an OO sorta' way and + * keep you from having to worry about cleaning up your mutexes properly, + * or initing them. + *@ingroup Threading + */ + class Mutex + { + public: + /** + * Create an unlocked mutex. + */ + Mutex(); + + /** + * Destroy a mutex. This can only be done when a mutex is unlocked. + * Failure to unlock before destroying a mutex object could cause it to + * wait for the mutex to unlock, the odds of which are usually farily + * low at deconstruction time. + */ + ~Mutex(); - /** - * Lock the mutex. This causes all future calls to lock on this - * instance of mutex to block until the first thread that called mutex - * unlocks it. At that point the next thread that called lock will get - * a chance to go to work. Because of the nature of a mutex lock it is - * a very bad idea to do any kind of serious or rather time consuming - * computation within a locked section. This can cause thread-deadlock - * and your program may hang. - */ - int lock(); + /** + * Lock the mutex. This causes all future calls to lock on this + * instance of mutex to block until the first thread that called mutex + * unlocks it. At that point the next thread that called lock will get + * a chance to go to work. Because of the nature of a mutex lock it is + * a very bad idea to do any kind of serious or rather time consuming + * computation within a locked section. This can cause thread-deadlock + * and your program may hang. + */ + int lock(); - /** - * Unlock the mutex. This allows the next thread that asked for a lock - * to lock the mutex and continue with execution. - */ - int unlock(); + /** + * Unlock the mutex. This allows the next thread that asked for a lock + * to lock the mutex and continue with execution. + */ + int unlock(); - /** - * Try to lock the mutex. This is the option to go with if you cannot - * avoid putting lengthy operations within a locked section. trylock - * will attempt to lock the mutex, if the mutex is already locked this - * function returns immediately with an error code. - */ - int trylock(); + /** + * Try to lock the mutex. This is the option to go with if you cannot + * avoid putting lengthy operations within a locked section. trylock + * will attempt to lock the mutex, if the mutex is already locked this + * function returns immediately with an error code. + */ + int trylock(); - protected: - pthread_mutex_t mutex; /**< The internal mutex reference. */ - }; + protected: + pthread_mutex_t mutex; /**< The internal mutex reference. */ + }; } #endif -- cgit v1.2.3