summaryrefslogtreecommitdiff
path: root/ufs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-10-19 20:53:28 +0000
committerMiles Bader <miles@gnu.org>1995-10-19 20:53:28 +0000
commitd26812e8851d3e9b00a126b55615f2d8ed851d27 (patch)
treec84f00443af4c107b502bc926e019fdf32d017fc /ufs
parent6b5b13a4b0978f70ea96f09262dd11b51909f400 (diff)
(flush_pokes): New function.
Diffstat (limited to 'ufs')
-rw-r--r--ufs/pokeloc.c19
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)