From owner-cvs-all Mon Dec 18 9:24:36 2000 From owner-cvs-all@FreeBSD.ORG Mon Dec 18 09:24:33 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id B4BC537B400; Mon, 18 Dec 2000 09:24:31 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.0/8.11.0) with ESMTP id eBIHOTs08000; Mon, 18 Dec 2000 10:24:29 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id KAA91757; Mon, 18 Dec 2000 10:24:28 -0700 (MST) Message-Id: <200012181724.KAA91757@harmony.village.org> To: Assar Westerlund Subject: Re: cvs commit: src/sys/libkern strlcat.c strlcpy.c src/sys/sys libkern.h src/sys/conf files Cc: Dag-Erling Smorgrav , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-reply-to: Your message of "18 Dec 2000 16:41:13 +0100." <5l4s01ka92.fsf@assaris.sics.se> References: <5l4s01ka92.fsf@assaris.sics.se> <200012180408.eBI48wg99879@freefall.freebsd.org> <5l66khluty.fsf@assaris.sics.se> <5lsnnlkcf7.fsf@assaris.sics.se> Date: Mon, 18 Dec 2000 10:24:28 -0700 From: Warner Losh Sender: imp@harmony.village.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <5l4s01ka92.fsf@assaris.sics.se> Assar Westerlund writes: : Dag-Erling Smorgrav 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