git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d01b7e1
)
Kernel - memmove improved (but with an assumption)
author
John Hodge
<
[email protected]
>
Fri, 21 Oct 2011 01:27:45 +0000
(09:27 +0800)
committer
John Hodge
<
[email protected]
>
Fri, 21 Oct 2011 01:27:45 +0000
(09:27 +0800)
Kernel/lib.c
patch
|
blob
|
history
diff --git
a/Kernel/lib.c
b/Kernel/lib.c
index
4d65108
..
6263dc8
100644
(file)
--- a/
Kernel/lib.c
+++ b/
Kernel/lib.c
@@
-966,6
+966,10
@@
void *memmove(void *__dest, const void *__src, size_t len)
if( (tVAddr)dest + len < (tVAddr)src )
return memcpy(dest, src, len);
+ // NOTE: Assumes memcpy works forward
+ if( (tVAddr)dest < (tVAddr)src )
+ return memcpy(dest, src, len);
+
if( (tVAddr)dest < (tVAddr)src )
block_size = (tVAddr)src - (tVAddr)dest;
else
UCC
git Repository :: git.ucc.asn.au