summaryrefslogtreecommitdiff
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
commit200ab835f25a0e4c5612d30fdf113e0fc62e841a (patch)
treecf980c5f8af5376acb4336c74010cd59f5cee014
parentd77d7cbde90553aa4178cba7e1591e0e6d4818c5 (diff)
(flush_pokes): New function.
-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)