OpenAmiga (864/959)

From:Rick Jones
Date:30 Aug 2000 at 12:05:39
Subject:Re: AMIOPEN: sharing /device/pointer

Marc Culler writes
> On Tue, Aug 29, 2000 at 07:47:12PM +0100, Matthew Kille wrote:
> > Hi All,
> >
> > How can I share an already open device? I expected a call to 'open' to
> > return a handle to the already opened device, but I just get "Access
> > Denied" (-2) type errors.
> >
> > I want to get direct (read only) access to the mouse/pen drivers, as
> > normally opened when AVE starts.
> >
> > The only way I've managed to get it to work is if I open another copy of
> > the device driver, under a different mount point:
> >
> > "devstart /device/mypointer /dev/pen/linux/x"
>
> I seem to have the opposite problem. I am able to open
> /device/keyboard, but I am _forced_ to share it with the shell. The
> shell always has a read request in the queue. If I read() the
> keyboard my read request goes into the same queue as the shell's
> request. The first key goes to the shell. The shell posts a new read
> request. The second goes to me. I post a new read request. The third
> key goes to the shell. The fourth to me and so on. The shell's keys
> get buffered, and when my program quits the shell tries to interpret
> all those keys that it got.
>
And so you see the utility of the Amiga chain of handlers fed a stream
of input events. Your code needs the ability to insert itself between
the keyboard and the shell; it would see every event and could pass
them on, absorb what does not belong to the shell, or translate them.

Let's hope the finished OE product has something like that.

> On the other hand, if I mount the keyboard device on a different mount
> point then I am able to open it, but my read requests never return.

Rick Jones
> - Marc
>
> Subscribe/Unsubscribe: open-request@amiga.com
> Amiga FAQ: http://www.amiga.com/faq.html

Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html