From d26812e8851d3e9b00a126b55615f2d8ed851d27 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 19 Oct 1995 20:53:28 +0000 Subject: (flush_pokes): New function. --- ufs/pokeloc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ufs') diff --git a/ufs/pokeloc.c b/ufs/pokeloc.c index 0e7235ad..e137090f 100644 --- a/ufs/pokeloc.c +++ b/ufs/pokeloc.c @@ -47,6 +47,25 @@ record_poke (void *loc, vm_size_t length) spin_unlock (&pokelistlock); } +/* Get rid of any outstanding pokes. */ +void +flush_pokes () +{ + struct pokeloc *pl; + + spin_lock (&pokelistlock); + pl = pokelist; + pokelist = 0; + spin_unlock (&pokelistlock); + + while (pl) + { + struct pokeloc *next = pl->next; + free (pl); + pl = next; + } +} + /* Sync all the modified pieces of disk */ void sync_disk (int wait) -- cgit v1.2.3