aboutsummaryrefslogtreecommitdiff
path: root/src/condition.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-10-06 03:25:22 +0000
committerMike Buland <eichlan@xagasoft.com>2011-10-06 03:25:22 +0000
commit208b983734d7431699f4bd3534e08321e42ada86 (patch)
treea6865f0db36e9c3b8dd13b9ed4d10d282f0f7cbf /src/condition.h
parent1358cb4c7325e01c13533ca402cccc28575cdf14 (diff)
downloadlibbu++-208b983734d7431699f4bd3534e08321e42ada86.tar.gz
libbu++-208b983734d7431699f4bd3534e08321e42ada86.tar.bz2
libbu++-208b983734d7431699f4bd3534e08321e42ada86.tar.xz
libbu++-208b983734d7431699f4bd3534e08321e42ada86.zip
Renamed most of the core threading system, some ancillary systems need some
kind of prefix or something, we could stick with Ito, I will until I think of something else.
Diffstat (limited to '')
-rw-r--r--src/condition.h (renamed from src/itocondition.h)16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/itocondition.h b/src/condition.h
index 88e8d6c..71634f5 100644
--- a/src/itocondition.h
+++ b/src/condition.h
@@ -5,25 +5,25 @@
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
6 */ 6 */
7 7
8#ifndef BU_ITO_CONDITION_H 8#ifndef BU_CONDITION_H
9#define BU_ITO_CONDITION_H 9#define BU_CONDITION_H
10 10
11#include <pthread.h> 11#include <pthread.h>
12 12
13#include "itomutex.h" 13#include "bu/mutex.h"
14 14
15namespace Bu 15namespace Bu
16{ 16{
17 /** 17 /**
18 * Ito condition. This is a fairly simple condition mechanism. As you may 18 * Ito condition. This is a fairly simple condition mechanism. As you may
19 * notice this class inherits from the ItoMutex class, this is because all 19 * notice this class inherits from the Mutex class, this is because all
20 * conditions must be within a locked block. The standard usage of a 20 * conditions must be within a locked block. The standard usage of a
21 * condition is to pause one thread, perhaps indefinately, until another 21 * condition is to pause one thread, perhaps indefinately, until another
22 * thread signals that it is alright to procede. 22 * thread signals that it is alright to procede.
23 * <br> 23 * <br>
24 * Standard usage for the thread that wants to wait is as follows: 24 * Standard usage for the thread that wants to wait is as follows:
25 * <pre> 25 * <pre>
26 * ItoCondition cond; 26 * Condition cond;
27 * ... // Perform setup and enter your run loop 27 * ... // Perform setup and enter your run loop
28 * cond.lock(); 28 * cond.lock();
29 * while( !isFinished() ) // Could be anything you're waiting for 29 * while( !isFinished() ) // Could be anything you're waiting for
@@ -36,18 +36,18 @@ namespace Bu
36 * or broadcast. See both of those functions for the difference. 36 * or broadcast. See both of those functions for the difference.
37 *@ingroup Threading 37 *@ingroup Threading
38 */ 38 */
39 class ItoCondition : public ItoMutex 39 class Condition : public Mutex
40 { 40 {
41 public: 41 public:
42 /** 42 /**
43 * Create a condition. 43 * Create a condition.
44 */ 44 */
45 ItoCondition(); 45 Condition();
46 46
47 /** 47 /**
48 * Destroy a condition. 48 * Destroy a condition.
49 */ 49 */
50 ~ItoCondition(); 50 ~Condition();
51 51
52 /** 52 /**
53 * Wait forever, or until signalled. This has to be called from within 53 * Wait forever, or until signalled. This has to be called from within