Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When an BASIC+ LOCK statement is executed, the system uses the file handle and record key information (if locking a record) to create a lock semaphore. In order to accommodate all potential network locking schemes, the semaphore is simplified by hashing the file and record information into a reduced eight-byte format.

UNLOCK ALL Within An MFS

The UNLOCK.ALL call functions differently than other lock calls.  When an BASIC+ UNLOCK ALL statement is executed, the system does not pass individual lock calls to each open file.  Instead, the system reviews the list of installed filing systems and makes a single UNLOCK.ALL call to each filing system.

Because this call is directed to the filing system specifically, an MFS receiving an UNLOCK.ALL call does not need to pass the call along to subsequent filing systems. If a call is attempted to the next MFS, a load error will occur.

The system will call all MFSs that have been installed during the current session, even if no files using that MFS are currently attached.

The MFS should simply perform any tasks required to clear all pending locks for that filing system. When this task is complete, the MFS should return with status set to true.

Additional Lock Calls

Additional lock calls exist in the system that are not available to MFS programmers. These are calls that the system uses to initialize and reset itself; as a result, these calls are passed only via direct calls at system initialization and reset time.

System lock calls are:

  • LOCK.SEMAPHORE

  • UNLOCK.SEMAPHORE

  • SET.USER.SEMAPHORE

An MFS will never receive these calls, and should therefore simply execute a RETURN for the CODE values of 23, 24, and 25.