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 | d26812e8851d3e9b00a126b55615f2d8ed851d27 (patch) | |
tree | c84f00443af4c107b502bc926e019fdf32d017fc /ufs | |
parent | 6b5b13a4b0978f70ea96f09262dd11b51909f400 (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) |