]> git.donarmstrong.com Git - rsem.git/commitdiff
Fixed a bug for calling pthread_join
authorBo Li <bli@cs.wisc.edu>
Mon, 23 Jul 2012 00:01:16 +0000 (19:01 -0500)
committerBo Li <bli@cs.wisc.edu>
Mon, 23 Jul 2012 00:01:16 +0000 (19:01 -0500)
EM.cpp
Gibbs.cpp
calcCI.cpp

diff --git a/EM.cpp b/EM.cpp
index 0d3872836784bcf45c9def4ae8ea09db6c4a7ef7..684d639271567df55dcfc785d196e0f7df075694 100644 (file)
--- a/EM.cpp
+++ b/EM.cpp
@@ -423,7 +423,6 @@ void EM() {
        Params fparams[nThreads];
        pthread_t threads[nThreads];
        pthread_attr_t attr;
-       void *status;
        int rc;
 
 
@@ -471,7 +470,7 @@ void EM() {
                }
 
                for (int i = 0; i < nThreads; i++) {
-                       rc = pthread_join(threads[i], &status);
+                       rc = pthread_join(threads[i], NULL);
                        pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) at ROUND " + itos(ROUND) + "!");
                }
 
@@ -521,7 +520,7 @@ void EM() {
                                pthread_assert(rc, "pthread_create", "Cannot create thread " + itos(i) + " (numbered from 0) when generating files for Gibbs sampler!");
                        }
                        for (int i = 0; i < nThreads; i++) {
-                               rc = pthread_join(threads[i], &status);
+                               rc = pthread_join(threads[i], NULL);
                                pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) when generating files for Gibbs sampler!");
                        }
                }
@@ -581,7 +580,7 @@ void EM() {
                pthread_assert(rc, "pthread_create", "Cannot create thread " + itos(i) + " (numbered from 0) when calculating expected weights!");
        }
        for (int i = 0; i < nThreads; i++) {
-               rc = pthread_join(threads[i], &status);
+               rc = pthread_join(threads[i], NULL);
                pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) when calculating expected weights!");
        }
        model.setNeedCalcConPrb(false);
index 63d35a829c059e12ae79bd8f3246fcec5b50438b..6bbfeb198c1cd72e81b0da02327dcefd6158c545 100644 (file)
--- a/Gibbs.cpp
+++ b/Gibbs.cpp
@@ -70,7 +70,6 @@ bool quiet;
 Params *paramsArray;
 pthread_t *threads;
 pthread_attr_t attr;
-void *status;
 int rc;
 
 void load_data(char* reference_name, char* statName, char* imdName) {
@@ -443,7 +442,7 @@ int main(int argc, char* argv[]) {
                pthread_assert(rc, "pthread_create", "Cannot create thread " + itos(i) + " (numbered from 0)!");
        }
        for (int i = 0; i < nThreads; i++) {
-               rc = pthread_join(threads[i], &status);
+               rc = pthread_join(threads[i], NULL);
                pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0)!");
        }
        release();
index 99ce14858825c989216dbd6ab309562218a8ae62..c71d9c17c96075d4abfa8633e6fa89624c961548 100644 (file)
@@ -69,7 +69,6 @@ bool quiet;
 Params *paramsArray;
 pthread_t *threads;
 pthread_attr_t attr;
-void *status;
 int rc;
 
 CIParams *ciParamsArray;
@@ -219,7 +218,7 @@ void sample_theta_vectors_from_count_vectors() {
                pthread_assert(rc, "pthread_create", "Cannot create thread " + itos(i) + " (numbered from 0) in sample_theta_vectors_from_count_vectors!");
        }
        for (int i = 0; i < num_threads; i++) {
-               rc = pthread_join(threads[i], &status);
+               rc = pthread_join(threads[i], NULL);
                pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) in sample_theta_vectors_from_count_vectors!");
        }
 
@@ -359,7 +358,7 @@ void calculate_credibility_intervals(char* imdName) {
                pthread_assert(rc, "pthread_create", "Cannot create thread " + itos(i) + " (numbered from 0) in calculate_credibility_intervals!");
        }
        for (int i = 0; i < num_threads; i++) {
-               rc = pthread_join(threads[i], &status);
+               rc = pthread_join(threads[i], NULL);
                pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) in calculate_credibility_intervals!");
        }