summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-11-06 20:06:05 +0000
committerMiles Bader <miles@gnu.org>1995-11-06 20:06:05 +0000
commit71259a969c4a59336be2137c87d018eba4973d41 (patch)
treec3efcedd4b99b0dac383261275ebe2047b8cc493
parent6ab7960423a2475a189ec1297874863a8b241c14 (diff)
(diskfs_sync_interval): New variable.
(diskfs_set_sync_interval): Set DISKFS_SYNC_INTERVAL.
-rw-r--r--libdiskfs/sync-interval.c8
1 files 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;