OpenAmiga (840/959)

From:Marc Culler
Date:30 Aug 2000 at 02:38:43
Subject:Re: AMIOPEN: sharing /device/pointer

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.

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.

- Marc

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