[Coco] single user mode for SCF devices?

Boisy G. Pitre boisy at tee-boy.com
Thu Dec 17 07:22:57 EST 2009


Aaron,

I am surprised that this isn't working.  Years ago, I patched SCF to honor the SHARE. bit in the mode byte of the device descriptor.  If you look in level2/modules/scf.asm, you'll see that on 05/25/93 I added code to check the SHARE. bit and return E$DevBsy if a path is already open on that device.

So if you set the bit in the descriptor, and open a path to it in process #1, then open attempt to open a path in process #2, the I$Open in process #2 should return E$DevBsy.  Can you verify this doesn't work with specific steps?
--
Boisy G. Pitre
http://www.tee-boy.com/

On Dec 16, 2009, at 10:05 PM, Aaron Wolfe wrote:

> Hello,
> 
> I have been trying without any luck to make an SCF device allow only
> one process to have a path open to it at a time.
> I see there is a mode byte in the device descriptor and one used in
> the F$Open call, and a bit for "Shared" or "Single User" depending on
> which documentation you read.
> In the OS9Defs file it is called SHARED.  Setting this in the
> descriptor doesn't do anything (multiple processes can open and write
> to the device), and setting it in the Open call causes the call to
> return error 203 - Illegal Mode.  The only documentation I see on
> single user mode is in the RBF section of the NitrOS-9 tech reference,
> no discussion in the SCF section, although it seems that the two are
> intertwined in some ways that I don't yet understand.
> 
> Does anyone know if it's possible to make an SCF device fail for
> additional opens until the first path is closed?  Or failing that, a
> simple way to detect that a device is already in use and bail out?
> 
> -Aaron
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco




More information about the Coco mailing list