From: Dan Bornstein Date: Fri, 28 Jan 2011 00:49:30 +0000 (-0800) Subject: Clarify the comment. X-Git-Tag: android-x86-4.0-r1~156^2~251 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;ds=sidebyside;h=0fbacd2cd48a5949e22ab0161a66491e2f8d41e1;p=android-x86%2Fdalvik.git Clarify the comment. bcopy() doesn't have a strong spec, so clarify here that it's about the Bionic implementation. Change-Id: Icc0e198272b43ae9ccce292ab7f2cdec36a83e49 --- diff --git a/vm/native/java_lang_System.c b/vm/native/java_lang_System.c index 4af0dfa42..dc0488536 100644 --- a/vm/native/java_lang_System.c +++ b/vm/native/java_lang_System.c @@ -30,12 +30,13 @@ static void copy(void *dest, const void *src, size_t n, bool sameArray, /* Might overlap. */ if (elemSize == sizeof(Object*)) { /* - * In addition to handling overlap properly, bcopy() - * guarantees atomic treatment of words. This is needed so - * that concurrent threads never see half-formed pointers - * or ints. The former is required for proper gc behavior, - * and the latter is also required for proper high-level - * language support. + * In addition to handling overlap properly, on Bionic + * bcopy() guarantees atomic treatment of words, whereas + * Bionic memmove() does not (as of this writing). + * Atomicity is needed so that concurrent threads never + * see half-formed pointers or ints. The former is + * required for proper gc behavior, and the latter is also + * required for proper high-level language support. * * Note: bcopy()'s argument order is different than memcpy(). */