Date: Tue, 11 Mar 2003 08:16:27 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 26682 for review Message-ID: <200303111616.h2BGGRDK049560@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26682 Change 26682 by jhb@jhb_laptop on 2003/03/11 08:16:10 Post the thread death events properly as a broadcast event. Affected files ... .. //depot/projects/smpng/sys/modules/evtest/evtest.c#9 edit Differences ... ==== //depot/projects/smpng/sys/modules/evtest/evtest.c#9 (text+ko) ==== @@ -334,12 +334,18 @@ static void thread_destroy(int i) { + int j; if (i < 0 || i >= NUM_THREADS || threads[i].ti_p == NULL) return; mtx_assert(&event_mtx, MA_OWNED); printf("%s: killing thread %d\n", __func__, i); threads[i].ti_event = -1; + broadcast_count = 0; + for (j = 0; j < NUM_THREADS; j++) + if (threads[j].ti_p != NULL) + broadcast_count++; + event = -1; cv_broadcast(&event_cv); msleep(threads[i].ti_p, &event_mtx, PWAIT, "evtstun", 0); threads[i].ti_p = NULL; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303111616.h2BGGRDK049560>