[comp.sys.amiga.tech] BUG IN AUDIO.DEVICE

dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) (01/07/89)

audio.device and incorrectly attributed it to WaitIO().

	The problem is that the audio.device does NOT ALWAYS USE ReplyMsg()
to return requests!  This means that the ln_Type field of the request will
not be set to NT_REPLYMSG.  WaitIO() depends on this to work!

	Thus, for the audio device, Under no circumstances are you to
use WaitIO()!  Instead, use WaitPort()/GetMsg() to get the request from
the message port when it is returned.

	I have found that with heavy use of CMD_WRITE's about 2-5% of the
requests are returned in this manner (i.e. improperly).

	Also, many people forget to set the ln_Type field of *any* IO
request to NT_MESSAGE before calling DoIO()/SendIO()/BeginIO().  In the
case of the audio.device it doesn't matter anyway since the audio.device's
returning of requests is broken.

				-Matt

shimoda@infohh.rmi.de (Markus Schmidt) (01/08/89)

In article <8901070159.AA04046@postgres.Berkeley.EDU> dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) writes:
>	Also, many people forget to set the ln_Type field of *any* IO
>request to NT_MESSAGE before calling DoIO()/SendIO()/BeginIO().  In the
I s this really necessary?? 

I think this should fall under the class of structure-hacks onand
should therefor not be necessary. Thinking about it sometimes 
I do not do this, since it works without too (serial.device,
console.decive).

Cu
Markus

dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) (01/10/89)

:I write:
:>	Also, many people forget to set the ln_Type field of *any* IO
:>request to NT_MESSAGE before calling DoIO()/SendIO()/BeginIO().  In the
:I s this really necessary?? 
: shimoda@infohh.rmi.de (Markus Schmidt) Writes:
:I think this should fall under the class of structure-hacks onand
:should therefor not be necessary. Thinking about it sometimes 
:I do not do this, since it works without too (serial.device,
:console.decive).
:
:Cu
:Markus

	Huh? structure-hacks?  If by not doing it a window exists in which
WaitIO()/CheckIO() will crash it most certainly is not a structure-hack.

	But as I said, I do not know if the "need to set the ln_Type field
to NT_MESSAGE" bug was fixed or not.  Can anybody at C-A say for sure that 
all IO devices now set the ln_Type field properly for asynchronous requests?

					-Matt