Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/tools/ctf/cvt make worker thread pr...



details:   https://anonhg.NetBSD.org/src/rev/2dd538f7e0a9
branches:  trunk
changeset: 464603:2dd538f7e0a9
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 13 21:32:07 2019 +0000

description:
make worker thread prototype match the pthread_create signature.

diffstat:

 external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 2d66bdb71777 -r 2dd538f7e0a9 external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c Sun Oct 13 21:24:37 2019 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c Sun Oct 13 21:32:07 2019 +0000
@@ -528,9 +528,10 @@
 /*
  * Main loop for worker threads.
  */
-static void
-worker_thread(workqueue_t *wq)
+static void *
+worker_thread(void *v)
 {
+       workqueue_t *wq = v;
        worker_runphase1(wq);
 
        debug(2, "0x%jx: entering first barrier\n",
@@ -559,6 +560,7 @@
            (uintmax_t)(uintptr_t)pthread_self());
 
        worker_runphase2(wq);
+       return NULL;
 }
 
 /*
@@ -728,8 +730,7 @@
        pthread_sigmask(SIG_BLOCK, &sets, NULL);
 
        for (i = 0; i < wq->wq_nthreads; i++) {
-               pthread_create(&wq->wq_thread[i], NULL,
-                   (void *(*)(void *))worker_thread, wq);
+               pthread_create(&wq->wq_thread[i], NULL, worker_thread, wq);
        }
 
 #ifdef illumos



Home | Main Index | Thread Index | Old Index