diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-01-13 20:37:10 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-01-13 20:37:10 +0000 |
commit | cb92810bfd089c5fbac854b1495c035c7dfd2107 (patch) | |
tree | bf29a83124026eacc6df45547aff3cb9986994cb /libpager/pager-sync.c | |
parent | 8164d0d13a07e84959feba35473458a6fbda6942 (diff) |
Formerly pager-sync.c.~2~
Diffstat (limited to 'libpager/pager-sync.c')
-rw-r--r-- | libpager/pager-sync.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libpager/pager-sync.c b/libpager/pager-sync.c index 14d9925c..34b715dd 100644 --- a/libpager/pager-sync.c +++ b/libpager/pager-sync.c @@ -16,7 +16,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static void +/* Have the kernel write back all dirty pages in the pager; if + WAIT is set, then wait for them to be finally written before + returning. */ +void pager_sync (struct pager *p, int wait) { vm_address_t offset; @@ -26,8 +29,19 @@ pager_sync (struct pager *p, int wait) lock_object (p, offset, len, MEMORY_OBJECT_RETURN_DIRTY, 0 VM_PROT_NO_CHANGE, wait); + if (shutting_down) p->pager_state = SHUTDOWN; } +/* Have the kernel write back some pages of a pager; if WAIT is set, + then wait for them to be finally written before returning. */ +void +pager_sync_some (struct pager *p, vm_address_t offset, + vm_size_t size, int wait) +{ + lock_object (p, offset, len, MEMORY_OBJECT_RETURN_DIRTY, 0 + VM_PROT_NO_CHANGE, wait); +} + |