Subject: CVS commit: syssrc/sys/sys
To: None <firstname.lastname@example.org>
From: Perry E. Metzger <email@example.com>
Date: 07/07/2001 07:14:43
Module Name: syssrc
Committed By: perry
Date: Sat Jul 7 04:14:43 UTC 2001
move the bcopy macro back to generating memcpy.
Here is why:
kernel bcopy and userland bcopy semantics were never the same. bcopy
in the kernel did not traditionally handle overlap.
ovbcopy in the kernel was the traditional "overlapping bcopy".
Lets take a step back here. The point of the macros was to provide
legacy interfaces so we could transition to mem* without disrupting
large parts of the code still being repeatedly merged, like the KAME
merges in net*/. Having purged the last ovbcopy from the kernel,
replacing them all with memmove, we didn't need ovbcopy any more so we
didn't need a macro.
Now, by leaving bcopy as memcpy, we make it clear that if you are
purging bcopys, you should replace them with memcpys. If we used
memmoves everywhere, it would lose very painstaking optimizations made
in the original code during which the ovbcopy/bcopy distinction was
held. Making bcopy into memmove is BAD BAD BAD.
It has been argued we should add an ovbcopy->memmove macro, but that
is precisely what we do not want -- if someone needs ovbcopy, what
they really want to write memmove, not ovbcopy. We don't want NEW code
with ovbcopy, having laboriously gotten rid of it.
In fact, the bcopy/bzero/bcmps in the kernel should all be purged. We
held off on doing net*/ to make the kame merge easier, and similarly
held off on some other places, but the time has come.
Anyway, for all these reasons, bcopy is changed back to memcpy.
To generate a diff of this commit:
cvs rdiff -r1.130 -r1.131 syssrc/sys/sys/systm.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.