Date: Mon, 18 Dec 2000 10:24:28 -0700 From: Warner Losh <imp@village.org> To: Assar Westerlund <assar@FreeBSD.org> Cc: Dag-Erling Smorgrav <des@ofug.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/libkern strlcat.c strlcpy.c src/sys/sys libkern.h src/sys/conf files Message-ID: <200012181724.KAA91757@harmony.village.org> In-Reply-To: Your message of "18 Dec 2000 16:41:13 %2B0100." <5l4s01ka92.fsf@assaris.sics.se> References: <5l4s01ka92.fsf@assaris.sics.se> <200012180408.eBI48wg99879@freefall.freebsd.org> <xzpu282ypvp.fsf@flood.ping.uio.no> <5l66khluty.fsf@assaris.sics.se> <xzpitohzu34.fsf@flood.ping.uio.no> <xzpae9tztba.fsf@flood.ping.uio.no> <5lsnnlkcf7.fsf@assaris.sics.se> <xzp66khzsdn.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <5l4s01ka92.fsf@assaris.sics.se> Assar Westerlund writes: : Dag-Erling Smorgrav <des@ofug.org> writes: : > Ah, so you need to add one line and change another to make them comply : > with the man page. : : More than that. I've not managed to write any strlcpy that is : remarkable smaller than the one in libc in generated code and since I : do not understand the point of squeezing these bytes from the code. : Having the same code as in libc seems like more important to me. But : since you find it important to squeeze down these functions to their : minimal size, it's probably is better left in your hands writing them. I think it is more important to have both libc and kernel match on this than to squeeze a few bytes as well. The one in libc is known to be good and not have any bugs, so why reinvent it for the kernel? The paper that was presented at Usenix shows that these routines were nearly as fast as the hand tweaked assembler that they replaced on intel. Not sure about other architectures. I'd say leave it as is. I didn't get involved in the arch discussion because I thought it was a good idea and there were few objections. I should have answered des' at the time. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012181724.KAA91757>