diff options
author | Tim Besard <tim.besard@gmail.com> | 2011-11-02 09:13:38 +0100 |
---|---|---|
committer | Tim Besard <tim.besard@gmail.com> | 2011-11-02 09:13:38 +0100 |
commit | c108197c20aa7b93849e383a3aaaf7b2bba30405 (patch) | |
tree | f05aa2ff019892dfc936ad2242d43373191f16cd /src/SpinBarrier.cpp | |
parent | eb6995fb5a0f4382cb4a01d301423e74ea8babe6 (diff) |
Formatting the source.
Diffstat (limited to 'src/SpinBarrier.cpp')
-rw-r--r-- | src/SpinBarrier.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/SpinBarrier.cpp b/src/SpinBarrier.cpp index d3d2d7b..d89e7c3 100644 --- a/src/SpinBarrier.cpp +++ b/src/SpinBarrier.cpp @@ -9,7 +9,6 @@ * Douglas M. Pase - initial API and implementation *
*******************************************************************************/
-
/******************************************************************************
* *
* SpinBarrier *
@@ -27,22 +26,18 @@ #include "SpinBarrier.h"
- // create a new barrier
-SpinBarrier::SpinBarrier(int participants)
-: limit( participants )
-{
- pthread_barrier_init( &barrier_obj, NULL, this->limit );
+// create a new barrier
+SpinBarrier::SpinBarrier(int participants) :
+ limit(participants) {
+ pthread_barrier_init(&barrier_obj, NULL, this->limit);
}
- // destroy an old barrier
-SpinBarrier::~SpinBarrier()
-{
+// destroy an old barrier
+SpinBarrier::~SpinBarrier() {
}
- // enter the barrier and wait. everyone leaves
- // when the last participant enters the barrier.
-void
-SpinBarrier::barrier()
-{
- pthread_barrier_wait( &this->barrier_obj );
+// enter the barrier and wait. everyone leaves
+// when the last participant enters the barrier.
+void SpinBarrier::barrier() {
+ pthread_barrier_wait(&this->barrier_obj);
}
|