Subject: bcopy in kernel
To: None <tech-kern@netbsd.org>
From: None <rick@snowhite.cis.uoguelph.ca>
List: tech-kern
Date: 10/28/2003 11:43:57
Well, my current nfs code (which has the V4 server in it) does use
bcopy() for cases where the src and dst may overlap. If your
kernel memcpy() will work ok for overlapping data
areas, you can simply define bcopy() as a macro that calls memcpy().
I can't remember for sure, but I thought that there was a ...realign()
function in the old NFS code that did the same thing. (Note that this
bcopy() would only be called in rare cases w.r.t. small TCP window
sizes resulting in an odd number of bytes in an mbuf data area, so it
may not happen, in practice.)
I think it would be useful to retain a copy function for overlapping
data areas in the kernel, whatever you choose to call it.
rick