mccarrol@topaz.rutgers.edu (<MC>) (12/26/87)
I'm trying two write a program which may involve writing to the serial device, while an asynch read may be pending. I've been doing this by opening the serial device twice, with non-exclusive access, but this is rather kludgy. According to the RKM, the same IOReq can be used for multiple requests; I assume this means you can duplicate the request. What fields do I need to duplicate in an IOExtSer? Also, what fields need to be duplicated on a IOStdReq? Thanks, <MC> -- "It is a principle of the music/to repeat the theme |Mark C. Carroll Repeat/and repeat again/as the pace mounts. /------/Rutgers U CS Student The theme/is difficult/but no more difficult |ARPA :CARROLL@AIM.RUTGERS.EDU than the facts to be/resolved"-WC Williams |Usenet:mccarrol@topaz.rutgers.edu
dillon@CORY.BERKELEY.EDU (Matt Dillon) (12/26/87)
>I'm trying two write a program which may involve writing to the serial >device, while an asynch read may be pending. I've been doing this by >opening the serial device twice, with non-exclusive access, but this >is rather kludgy. According to the RKM, the same IOReq can be used >for multiple requests; I assume this means you can duplicate the >request. What fields do I need to duplicate in an IOExtSer? >Also, what fields need to be duplicated on a IOStdReq? Simply allocate another IOExtSer structure and do a structure copy from the original to the new... walla, you may now use both of them separately. You can even use the same reply port! Many of the special fields (such as the baud rate) are only used by SDCMD_SETPARAMS. The basic requirements for a copy of the request is for the Device, Unit, and ReplyPort fields to be filled in. See the last couple of posting from me in comp-sys-amiga for proper device driver call usage. -Matt