diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-10-27 04:44:46 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-10-27 04:44:46 +0000 |
commit | 9906ffe3c54875133448134c09ec12a0949d48cd (patch) | |
tree | 0542fef3d27e796700b87b44394a3ad31dd5b852 /src/condition.h | |
parent | 411f240da34bab53cd18aa8b7ba09834ede49b1c (diff) | |
parent | 029b5d159023f4dad607359dbfaa2479e21fe9e5 (diff) | |
download | libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.gz libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.bz2 libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.xz libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.zip |
Reorg'd! I merged in the release-fixup branch and fixed all random warnings.
I also cleaned up the build script, the symlink generation is faster and looks
nicer, there's one think left to fix there, but it's not too bad.
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 | ||
15 | namespace Bu | 15 | namespace 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 |