aboutsummaryrefslogtreecommitdiff
path: root/sys/fio/fflsbf.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/fio/fflsbf.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/fio/fflsbf.x')
-rw-r--r--sys/fio/fflsbf.x27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/fio/fflsbf.x b/sys/fio/fflsbf.x
new file mode 100644
index 00000000..7503609a
--- /dev/null
+++ b/sys/fio/fflsbf.x
@@ -0,0 +1,27 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <syserr.h>
+include <config.h>
+include <fio.h>
+
+# FFLSBF -- Flush the file buffer. Called by FFAULT to initiate a write
+# of the file buffer when a fault occurs.
+
+procedure fflsbf (fd, bp, maxchars, buffer_offset)
+
+int fd
+pointer bp
+int maxchars
+long buffer_offset
+errchk fwatio
+include <fio.com>
+
+begin
+ fp = fiodes[fd]
+
+ if (FBUFMODE(fp) != INACTIVE)
+ call fwatio (fd)
+ call awrite (fd, Memc[bp], maxchars, buffer_offset)
+
+ FBUFMODE(fp) = WRITE_IN_PROGRESS
+end