mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
.
This commit is contained in:
parent
6e583a6e11
commit
caa8cd20fd
2 changed files with 8 additions and 5 deletions
|
@ -8,3 +8,5 @@ configparms
|
||||||
sun4 i386 i386-gnuelf hp300-netbsd hp300
|
sun4 i386 i386-gnuelf hp300-netbsd hp300
|
||||||
|
|
||||||
ieeetest hppa-sysdeps regex
|
ieeetest hppa-sysdeps regex
|
||||||
|
|
||||||
|
gpl2lgpl.sed
|
||||||
|
|
|
@ -42,25 +42,26 @@ Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#if PAGE_COPY_THRESHOLD
|
#if PAGE_COPY_THRESHOLD
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#define PAGE_COPY_FWD_MAYBE(dstp, srcp, nbytes_left, nbytes) \
|
#define PAGE_COPY_FWD_MAYBE(dstp, srcp, nbytes_left, nbytes) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if ((nbytes) >= PAGE_COPY_THRESHOLD && \
|
if ((nbytes) >= PAGE_COPY_THRESHOLD && \
|
||||||
PAGE_OFFSET (dstp) == PAGE_OFFSET (srcp)) \
|
PAGE_OFFSET ((dstp) - (srcp)) == 0) \
|
||||||
{ \
|
{ \
|
||||||
/* The amount to copy is past the threshold for copying \
|
/* The amount to copy is past the threshold for copying \
|
||||||
pages virtually with kernel VM operations, and the \
|
pages virtually with kernel VM operations, and the \
|
||||||
source and destination addresses have the same alignment. */ \
|
source and destination addresses have the same alignment. */ \
|
||||||
size_t nbytes_before = PAGE_OFFSET (PAGE_SIZE - PAGE_OFFSET (dstp));\
|
size_t nbytes_before = PAGE_OFFSET (-(dstp)); \
|
||||||
if (nbytes_before != 0) \
|
if (nbytes_before != 0) \
|
||||||
{ \
|
{ \
|
||||||
/* First copy the words before the first page boundary. */ \
|
/* First copy the words before the first page boundary. */ \
|
||||||
WORD_COPY_FWD (dstp, srcp, nbytes_left, nbytes_before); \
|
WORD_COPY_FWD (dstp, srcp, nbytes_left, nbytes_before); \
|
||||||
nbytes_before -= nbytes_left; \
|
assert (nbytes_left == 0); \
|
||||||
nbytes -= nbytes_before; \
|
nbytes -= nbytes_before; \
|
||||||
} \
|
} \
|
||||||
if (nbytes_before == 0) \
|
PAGE_COPY_FWD (dstp, srcp, nbytes_left, nbytes); \
|
||||||
PAGE_COPY_FWD (dstp, srcp, nbytes_left, nbytes); \
|
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue