# # # patch "threads.hh" # from [fe09d1a7d4ab8efb3b7e7db539ce2654ddedd11e] # to [6465442405723ea709b52bd87dc7afea45c3ac8f] # # patch "unix/threads.cc" # from [854ac01d68fe24d60b45134986d3044ea10c1bbd] # to [a52626b012472c01a272d31120cc6b00246c140d] # ============================================================ --- threads.hh fe09d1a7d4ab8efb3b7e7db539ce2654ddedd11e +++ threads.hh 6465442405723ea709b52bd87dc7afea45c3ac8f @@ -1,7 +1,7 @@ #ifndef __THREADS_HH__ #define __THREADS_HH__ -// Copyright (C) 2008 Markus Schiltknecht
+// Copyright (C) 2008 Markus Wanner // // This program is made available under the GNU GPL version 2.0 or // greater. See the accompanying file COPYING for details. @@ -42,8 +42,7 @@ public: { threaded_task *task = tstack.top(); tstack.pop(); - task->operator()(); - //create_thread_for(task); + create_thread_for(task); } } }; ============================================================ --- unix/threads.cc 854ac01d68fe24d60b45134986d3044ea10c1bbd +++ unix/threads.cc a52626b012472c01a272d31120cc6b00246c140d @@ -1,4 +1,4 @@ -// Copyright (C) 2008 Markus Schiltknecht +// Copyright (C) 2008 Markus Wanner // // This program is made available under the GNU GPL version 2.0 or // greater. See the accompanying file COPYING for details. @@ -35,9 +35,7 @@ void *threaded_call(void *c) void *threaded_call(void *c) { thread_context * ctx = (thread_context*) c; - - (*ctx->task)(); - + ctx->task->operator()(); pthread_exit(NULL); } @@ -51,7 +49,7 @@ create_thread_for(threaded_task * task) thread_context * ctx = new thread_context(); ctx->task = task; - rc = pthread_create(&thread, NULL, threaded_call, (void*) &ctx); + rc = pthread_create(&thread, NULL, threaded_call, (void*) ctx); I(!rc); rc = pthread_join(thread, &status);