Date: Sat, 15 Dec 2012 12:46:02 -0800 From: Garrett Cooper <yanegomi@gmail.com> To: Mark Johnston <markjdb@gmail.com> Cc: Davide Italiano <davide@freebsd.org>, Alexander Motin <mav@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: [RFC/RFT] calloutng Message-ID: <35705A81-690A-4993-B0C3-C8BC0BC89C67@gmail.com> In-Reply-To: <20121215203458.GA22361@oddish> References: <50CCAB99.4040308@FreeBSD.org> <20121215203458.GA22361@oddish>
next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 15, 2012, at 12:34 PM, Mark Johnston wrote: > On Sat, Dec 15, 2012 at 06:55:53PM +0200, Alexander Motin wrote: >> Hi. >>=20 >> I'm sorry to interrupt review, but as usual good ideas came during = the=20 >> final testing, causing another round. :) Here is updated patch for=20= >> HEAD, that includes several new changes: >> http://people.freebsd.org/~mav/calloutng_12_15.patch >=20 > This patch breaks the libprocstat build. >=20 > Specifically, the OpenSolaris sys/time.h defines the preprocessor > symbols gethrestime and gethrestime_sec. These symbols are also = defined > in cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h. > libprocstat:zfs.c is compiled using include paths that pick up the > OpenSolaris time.h, and with this patch _callout.h includes = sys/time.h. >=20 > zfs.c includes taskqueue.h (with _KERNEL defined), which includes > _callout.h, so both time.h and zfs_context.h are included in zfs.c, = and > the symbols are thus defined twice. >=20 > The patch below fixes the build for me. Another approach might be to > include sys/_task.h instead of taskqueue.h at the beginning of zfs.c. I had a patch open once upon a time to cleanup inclusion of = sys/time.h all over the tree and deal with the sys/time.h <-> time.h = pollution issue, but it got dropped due to lack of interest (20~30 = apps/libs were affected IIRC and I only really got assistance in fixing = the UFS and bsnmpd pieces, and gave up due to lack of response from = maintainers). dtrace/zfs is a definite instigator in this pollution (I = remember nasty cddl/... pollution with the compat sys/time.h header). Bottom line: make sure anything new you're defining isn't = already defined via POSIX or other OSes, and if so please try to make = the implementations match (so that eventual POSIX inclusion might be = possible) and when in doubt I suggest consulting standards@ / brde@. Cheers, -Garrett=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35705A81-690A-4993-B0C3-C8BC0BC89C67>