From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/fio/fflsbf.x | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sys/fio/fflsbf.x (limited to 'sys/fio/fflsbf.x') 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 +include +include + +# 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 + +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 -- cgit