From 71259a969c4a59336be2137c87d018eba4973d41 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 6 Nov 1995 20:06:05 +0000 Subject: (diskfs_sync_interval): New variable. (diskfs_set_sync_interval): Set DISKFS_SYNC_INTERVAL. --- libdiskfs/sync-interval.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libdiskfs/sync-interval.c b/libdiskfs/sync-interval.c index 0c51a27b..c86eba6a 100644 --- a/libdiskfs/sync-interval.c +++ b/libdiskfs/sync-interval.c @@ -26,6 +26,9 @@ #include "priv.h" +/* A user-readable variable reflecting the last set sync interval. */ +int diskfs_sync_interval = 0; + /* The thread that's doing the syncing. */ static cthread_t periodic_sync_thread; @@ -33,9 +36,7 @@ static cthread_t periodic_sync_thread; an RPC. We can use ports_inhibit_port_rpcs on this port to guarantee that the periodic_sync_thread is quiescent. */ static struct port_info *pi; - - static void periodic_sync (); /* Establish a thread to sync the filesystem every INTERVAL seconds, or @@ -69,6 +70,9 @@ diskfs_set_sync_interval (int interval) err = EIEIO; } + if (!err) + diskfs_sync_interval = interval; + ports_resume_port_rpcs (pi); return err; -- cgit v1.2.3