Module Name:    src
Committed By:   snj
Date:           Thu Jul 16 21:52:28 UTC 2015

Modified Files:
        src/external/cddl/osnet/dist/tools/ctf/cvt [netbsd-7]: ctfmerge.c
        src/share/mk [netbsd-7]: sys.mk

Log Message:
Pull up following revision(s) (requested by chs in ticket #866):
        external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c: revision 1.12 via 
patch
        share/mk/sys.mk: revision 1.128
reapply some fixes to make multi-threaded ctfmerge work
that were lost in the overzealous resync with freebsd.
remove the hacks which were applied to work around those problems.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.4.1 \
    src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
cvs rdiff -u -r1.127 -r1.127.2.1 src/share/mk/sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.9 src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.9.4.1
--- src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.9	Sun Mar  9 19:14:15 2014
+++ src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c	Thu Jul 16 21:52:27 2015
@@ -177,7 +177,13 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE /* XXX TBD fix this */
 #include <unistd.h>
+#undef _NETBSD_SOURCE
+#else
+#include <unistd.h>
+#endif
 #include <pthread.h>
 #include <assert.h>
 #if defined(sun)
@@ -674,6 +680,7 @@ wq_init(workqueue_t *wq, int nfiles)
 
 	for (i = 0; i < nslots; i++) {
 		pthread_mutex_init(&wq->wq_wip[i].wip_lock, NULL);
+		pthread_cond_init(&wq->wq_wip[i].wip_cv, NULL);
 		wq->wq_wip[i].wip_batchid = wq->wq_next_batchid++;
 	}
 
@@ -777,7 +784,7 @@ main(int argc, char **argv)
 		debug_level = atoi(getenv("CTFMERGE_DEBUG_LEVEL"));
 
 	err = 0;
-	while ((c = getopt(argc, argv, ":cd:D:fgl:L:o:tvw:sS:")) != EOF) {
+	while ((c = getopt(argc, argv, ":cd:D:fgl:L:o:tvw:s")) != EOF) {
 		switch (c) {
 		case 'c':
 			docopy = 1;
@@ -825,9 +832,6 @@ main(int argc, char **argv)
 			/* use the dynsym rather than the symtab */
 			dynsym = CTF_USE_DYNSYM;
 			break;
-		case 'S':
-			maxslots = atoi(optarg);
-			break;
 		default:
 			usage();
 			exit(2);

Index: src/share/mk/sys.mk
diff -u src/share/mk/sys.mk:1.127 src/share/mk/sys.mk:1.127.2.1
--- src/share/mk/sys.mk:1.127	Sun Aug 10 05:57:31 2014
+++ src/share/mk/sys.mk	Thu Jul 16 21:52:28 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: sys.mk,v 1.127 2014/08/10 05:57:31 matt Exp $
+#	$NetBSD: sys.mk,v 1.127.2.1 2015/07/16 21:52:28 snj Exp $
 #	@(#)sys.mk	8.2 (Berkeley) 3/21/94
 #
 # This file contains the basic rules for make(1) and is read first
@@ -46,8 +46,7 @@ LINK.c?=	${CC} ${CFLAGS} ${CPPFLAGS} ${L
 
 # C Type Format data is required for DTrace
 CTFFLAGS	?=	-g -L VERSION
-# Use only one thread for now.
-CTFMFLAGS	?=	-S 1 -g -t -L VERSION
+CTFMFLAGS	?=	-t -g -L VERSION
 
 CXX?=		c++
 CXXFLAGS?=	${CFLAGS:N-Wno-traditional:N-Wstrict-prototypes:N-Wmissing-prototypes:N-Wno-pointer-sign:N-ffreestanding:N-std=gnu[0-9][0-9]:N-Wold-style-definition:N-Wno-format-zero-length}

Reply via email to