9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: northern snowfall <dbailey27@ameritech.net>
To: 9fans@cse.psu.edu
Subject: [9fans] bcopy in APE
Date: Mon, 15 Sep 2003 03:20:49 -0500	[thread overview]
Message-ID: <3F657661.1090902@ameritech.net> (raw)

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.





             reply	other threads:[~2003-09-15  8:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-15  8:20 northern snowfall [this message]
2003-09-15  8:36 ` northern snowfall
2003-09-15  9:20   ` C H Forsyth
2003-09-15  8:46 ` boyd, rounin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F657661.1090902@ameritech.net \
    --to=dbailey27@ameritech.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).