diff options
author | Miles Bader <miles@gnu.org> | 1995-10-19 20:53:28 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-10-19 20:53:28 +0000 |
commit | 200ab835f25a0e4c5612d30fdf113e0fc62e841a (patch) | |
tree | cf980c5f8af5376acb4336c74010cd59f5cee014 /ufs | |
parent | d77d7cbde90553aa4178cba7e1591e0e6d4818c5 (diff) |
(flush_pokes): New function.
Diffstat (limited to 'ufs')
-rw-r--r-- | ufs/pokeloc.c | 19 |
1 files changed, 19 insertions, 0 deletions
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) |