9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] bcopy in APE
@ 2003-09-15  8:20 northern snowfall
  2003-09-15  8:36 ` northern snowfall
  2003-09-15  8:46 ` boyd, rounin
  0 siblings, 2 replies; 4+ messages in thread
From: northern snowfall @ 2003-09-15  8:20 UTC (permalink / raw)
  To: 9fans

Finishing out my network stack redesign in netbsd, I glanced
at the source of the bcopy function. The BSD implementation,
found at /sys/lib/libsa/bcopy.c, increments while copying
octets if arg1 is greater than arg2.

However, the plan9 APE implementation of bcopy (found at
/sys/src/ape/lib/ap/gen/memmove.c) decrements.

My question is, why does the function need to increment or
decrement at all? And if there is a specific reason, why does
plan9's implementation do it opposite of the netbsd? I really
have no idea why the if(x < y) clause is needed.

Comments?
Don

http://www.7f.no-ip.com/~north_

Yes, soon. Just email me if you need something off the site.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-09-15  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-15  8:20 [9fans] bcopy in APE northern snowfall
2003-09-15  8:36 ` northern snowfall
2003-09-15  9:20   ` C H Forsyth
2003-09-15  8:46 ` boyd, rounin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).