{
{  MMP$MOVE_PAGES (PVA_SOURCE, PVA_DESTINATION, LENGTH, MODIFIED_BIT_OPTION,
{        REJECT_MOVE_IF_SOURCE_MODIFIED, MOVED_MODIFIED_PAGE_COUNT, STATUS)
{
{  The purpose of this request is to move a page frame from one PVA (process_
{  virtual_address) to another.  When the request completes all pages in the
{  range from <pva_source> to <pva_source>+<length-1> will have been moved
{  to the range of addresses specified by <pva_destination> to
{  <pva_destination>+<length-1>.  The caller must have write access to both
{  the source and destination segments.  This procedure can be called
{  through ring six.
{
{  PVA_SOURCE:  (input)  This parameter specifies the beginning address of
{        pages the calles wants moved.  The pva must be a page boundary.
{
{  PVA_DESTINATION:  (input)  This parameter specifies the beginning
{        address of where the caller wants the pages moved to.  The pva
{        must be a page boundary.
{
{  LENGTH:  (inpu)  This parameter specifies the number of bytes the caller
{        wants moved.  The length nust be a multiple of page size.  The
{        maximum request length is 64K bytes.
{
{  MODIFIED_BIT_OPTION: (input)  This parameter specifies what the caller
{        wants done with the modified bit on the destination page.  Valid
{        options are:
{          mmc$mp_set_modified:  Set the modified bit on the destination page.
{          mmc$mp_clear_modified:  Clear the modified bit on the destination
{          page.
{          mmc$mp_no_change_to_modified:  Leave the modified bit on the
{                destination page as it was on the source page.
{
{  REJECT_MOVE_IF_SOURCE_MODIFIED:  (input)  This boolean parameter specifies
{        whether or not the caller wants the move request to be rejected if
{        a source page is modified.  If this parameter is TRUE and any page
{        in the range from <pva_source> to <pva_source>+<length-1> is
{        modified, the error mme$modified_source_page_reject will be returned.
{        No pages will have been moved.
{
{  MOVED_MODIFIED_PAGE_COUNT:  (output)  This parameter specifies the number
{        of modified source pages that were moved.  If the parameter
{        REJECT_MOVE_IF_SOURCE_MODIFIED is TRUE, this count is meaningless
{        and zero will be returned.
{
{  STATUS  (output)  This parameter specifies the request status.
{        Errors returned:
{          mme$pva_not_on_page_boundary
{          mme$length_not_page_size_mult
{          mme$invalid_length_requested
{          mme$invalid_pva
{          mme$modified_source_page_reject
{
{
{  NOTES and CAUTIONS:
{    1.  MMP$MOVE_PAGES in NOT intended to be used for manipulating pages of
{        shared permanent files.
{
{        1a.  File has one writer, shared for read:  The writer can take
{             away or overwite pages a reader is accessing.  If a modified
{             page was "moved" away, the reader would page fault from disk
{             and get stale data.
{
{        1b.  File shared for write:  Use of MMP$MOVE_PAGES can take away
{             pages before another user has completed modifications or written
{             the modified pages to disk.  If there are multiple writers of
{             the file, MMP$MOVE_PAGES will produce UNDEFINED RESULTS.
{
{    2.  Memory manager will rely on the caller of MMP$MOVE_PAGES to "know
{        what it's doing."
{
{        2a.  If the destination page already exists in memory, that page
{             will be discarded.
{
{    3.  When a page ages out of memory, the page is written to disk only if
{        the modified bit for the page is set.  The caller can use the
{        MODIFIED_BIT_OPTION parameter to control and ensure whether or not
{        pages get written to disk when they age out of memory.  The
{        implications of the use of this parameter must be understood.
{
{        3a.  Use of the mmc$mp_set_modified option guarantees that the
{             destination page will be written to disk if the page ages out
{             of memory, even if no further modifications have yet been
{             made to the destination page.  A subsequent page fault for the
{             page will restore the page.
{
{             For example, consider using MMP$MOVE_PAGES for transfers between
{             a database and buffer segment.  If the mmc$mp_set_modified
{             option is used when a page is moved to the buffer segment (the
{             backing file for the buffer segment has undefined data on it),
{             and
{             the page ages out of memory, it will be written to disk.  A
{             subsequent page fault will restore the page, modifications can be
{             made to it, and the page can eventually be moved back to the
{             database segment.  However, if the mmc$mp_clear_modified option
{             is used when a page is moved to the buffer segment and the page
{             ages out of memory before it is modified, the page will NOT be
{             written to disk.  A page fault will read in whatever undefined
{             data is out on disk; a subsequent move of the page back to the
{             database segment and a write request to the permanent file will
{             trash the database.  Use of the mmc$mp_no_change_to_modified
{             option could have the same effect as the mmc$mp_clear_modified
{             option.
{
{        3b.  Use of the mmc$mp_clear_modified or mmc$mp_no_change_to_modified
{             option makes sense only if the caller knows that the source
{             page matches what is already on disk for the destination page.
{
{        3c.  Even if the caller knows that the source page has been
{             modified, the mmc$mp_set_modified option should be used
{             rather that the mmc$mp_no_change_to_modified option.
{
{             For example, if a modified page in the buffer segment ages out of
{             memory before it is moved back to the database segment, it will
{             be written to the backing file associated with the buffer segment
{             and the modified bit for the page will be cleared.  A move back
{             to
{             the database segment using the mmc$mp_no_change_to_modified
{             option will not set the modified bit for that page.  If the page
{             ages out of memory it will NOT be written to disk and the
{             modifications will be lost.
{
