[Coco] single user mode for SCF devices?

Aaron Wolfe aawolfe at gmail.com
Thu Dec 17 15:22:34 EST 2009

Ok, got it working now.  I was focusing too much on the open call and
not the descriptor.  I didn't see any terminal devices (looked at
bitbangerm 6551, dragon, etc) with the SHARE bit set in their
descriptors, which seemed odd, so I thought I was really supposed to
do it in the open call then.  Anyway, setting SHARE in the mode bit of
the descriptor does work properly as you described.  You just use
regular open calls, read write or update mode.  The second man in gets
a error 250, which is perfect.


On Thu, Dec 17, 2009 at 7:22 AM, Boisy G. Pitre <boisy at tee-boy.com> wrote:
> 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
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco

More information about the Coco mailing list