Date: Wed, 18 Nov 2009 06:41:46 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: davidxu@freebsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199465 - head/lib/librt Message-ID: <20091118.064146.-290369589.imp@bsdimp.com> In-Reply-To: <4B037C0A.5030804@freebsd.org> References: <200911180135.nAI1ZaIe051549@svn.freebsd.org> <20091117.210502.-1623813784.imp@bsdimp.com> <4B037C0A.5030804@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <4B037C0A.5030804@freebsd.org> David Xu <davidxu@freebsd.org> writes: : M. Warner Losh wrote: : > In message: <200911180135.nAI1ZaIe051549@svn.freebsd.org> : > David Xu <davidxu@freebsd.org> writes: : > : Author: davidxu : > : Date: Wed Nov 18 01:35:36 2009 : > : New Revision: 199465 : > : URL: http://svn.freebsd.org/changeset/base/199465 : > : : > : Log: : > : Fix compiler warnings. : > : : > : Modified: : > : head/lib/librt/sigev_thread.c : > : : > : Modified: head/lib/librt/sigev_thread.c : > : ============================================================================== : > : --- head/lib/librt/sigev_thread.c Wed Nov 18 01:13:15 2009 (r199464) : > : +++ head/lib/librt/sigev_thread.c Wed Nov 18 01:35:36 2009 (r199465) : > : @@ -439,9 +439,9 @@ worker_routine(void *arg) : > : { : > : struct sigev_node *sn = arg; : > : : > : - _pthread_cleanup_push(worker_cleanup, sn); : > : + pthread_cleanup_push(worker_cleanup, sn); : > : sn->sn_dispatch(sn); : > : - _pthread_cleanup_pop(1); : > : + pthread_cleanup_pop(1); : > : : > : return (0); : > : } : > : > This change causes libthr to be needed now for librt. Before this : > wasn't the case, so ntp break on mips now (I haven't looked at other : > arcs yet). _pthread_cleanup_pop is exported from libc, while : > pthread_cleanup_pop causes __pthread_cleanup_pop_imp to be referenced, : > which is defined in libthr. : > : > I guess that's a long way of saying "gee, this seems wrong to me, : > please explain what you are fixing better or revert this change, : > thanks" :) : > : > Warner : > : > : : librt needs libpthread to function correctly, otherwise SIGEV_THREAD : notification won't work, though the ntp code may not use it, but who : can guarantee librt never use threads? in old design, the timer : functions were really in libpthread and implemented as threads. : : Regards, : David Xu : : : Index: ntpdate/Makefile : =================================================================== : --- ntpdate/Makefile (revision 199351) : +++ ntpdate/Makefile (working copy) : @@ -9,7 +9,7 @@ : CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ : : DPADD= ${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT} : -LDADD= ${LIBNTP} -lm -lmd -lrt : +LDADD= ${LIBNTP} -lm -lmd -lrt -lpthread : : CLEANFILES+= .version version.c : : Index: ntpd/Makefile : =================================================================== : --- ntpd/Makefile (revision 199351) : +++ ntpd/Makefile (working copy) : @@ -33,7 +33,7 @@ : -I${.CURDIR}/../../../contrib/ntp/libopts -I${.CURDIR} : : DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT} ${LIBOPTS} : -LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd -lrt ${LIBOPTS} : +LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd -lrt -lpthread ${LIBOPTS} : : .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) : DPADD+= ${LIBCRYPTO} I'd like to look more deeply into this issue. Can you back out the original commit until I can track things down a little more completely? Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091118.064146.-290369589.imp>