Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p_memcpy implementation #130

Open
indrora opened this issue Jun 11, 2015 · 0 comments
Open

p_memcpy implementation #130

indrora opened this issue Jun 11, 2015 · 0 comments

Comments

@indrora
Copy link
Contributor

indrora commented Jun 11, 2015

p_memcpy(void*, void*, int, int) needs to be implemented.

There's a lot of implementations of memcpy -- newlib has a fantastically huge one for each platform.

Some notes from the source:

 * 0. User space
 * 1. Specific to bsb/device/os
 * 2. Should be lightning fast
 * 3. Add "safety" compile switch for error checking
 * 4. Function should not call any
 * 5. Need a different call per chip, board, O/S?

and some personal observations:

  1. Of course it's userspace.
  2. Why? How? (If it's specific to a bsp/dev/os, shouldn't it be dev_ops?)
  3. This needs to be clearly defined; newlib variants can be found with fantastical memcpy implementations, optimizing for all sorts of things, and OpenBSD has it in libkern.
  4. How should this be named? Kernel style doesn't dictate those names (as I can tell). I would rather a compile flag along the lines of FAIL_FAST but others would name it __SAFE_MEMCPY.
  5. Did Candlejack come b--
  6. Should this be a special thing? (also, somewhat contradicts item 1)

Memcpy isn't a terribly special function, but gets a lot of press for being a pusher of bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant