BackgroundFiqLock - set to non-0 to prevent BackgroundClaimFiq from doing so

DoService_ClaimFiq:
   Set BackgroundFiqLock to &ff
   Wait for FiqOwnership to be 0
   Set BackgroundFiqLock to 0

BeforeAlter/ReadFsMap:
   For floppy does FloppyDiscWriteBehindWait
                Sets FloppyLock
                If FloppyWriteBehindDrive<>&ff then
                        gets DiscsDrv
                else
                        LockDisc
   In one atomic write it:
     Sets LockedDrive to gotten drive
     Sets LockedDisc and ModifyDisc to given disc
   Clears FloppyLock if floppy
   Sets CritDiscRec to given disc rec
   Load+check map on drive
   Set ModifyDisc to -1 if ReadFsMap
   if error UnlockMap

UnlockMap
   If floppy then
       Set floppylock
       if floppywritebehinddrive = &ff then unlock floppywritebehinddrive
   In one atomic write it:
     Sets LockedDrive to &ff
     Sets LockedDisc and ModifyDisc to &ff
   clear floppylock

DoOsArgsWriteZeroes
   Does a FloppyDiscWriteBehindWait

PutBytesEntry
   Does a FloppyDiscWriteBehindWait
   Messes about locking disc into a drive for floppies only
   Sets in one atomic write floppywritebehinddisc and drive
   Wait for process to cease being active in the interesting area of our file
   ClaimFileCache
   Sort out which buffers to use
   If process is writing behind our fcb, ending where we start and the process can be extended, then
      Extend process, extending floppywritebehindleft as necessary
      Loop until everything has gone in via buffers
      releasefilecache
      wait for direct part of process to complete
      set writedisc to &ff
      if floppywritebehinddisc probably not &f0 then
        reducefloppywritebehind
      releasecontroller
   else
      if process inactive
        if all the write got buffered
          set WriteDisc to &ff
          if floppywritebehinddisc likely to be non-&ff
            reducefloppywritebehind(0)
          releasefilecache
          releasecontroller
          backgroundops
        else
          BeforeReadFsMap
          work out foreground/background split
          backgroundfilecacheop
          updateprocesses
          releasefilecache
          wait for direct part of process to complete
          set writedisc to &ff
          if floppywritebehinddisc probably not &f0 then
            reducefloppywritebehind
          releasecontroller
      else
        if all the write got buffered then
          releasefilecache
          wait for direct part of process to complete
          set writedisc to &ff
          if floppywritebehinddisc probably not &f0 then
            reducefloppywritebehind(0)
          releasecontroller
        else
          loop around, waiting for process to fail/finish/release enough buffers to buffer transfer

