Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Jose on August 11, 2005, 05:42:53 PM

Title: IoRequest resetting
Post by: Jose on August 11, 2005, 05:42:53 PM
Hi. Do I really need to reset the Io_Command field every time I want to reuse the IoRequest ?

What about when creating new requests from one that is being served, can I just AllocMem() sizeof the request and copy over the first one ?

:pint:
Title: Re: IoRequest resetting
Post by: itix on August 11, 2005, 08:01:22 PM
Quote

Hi. Do I really need to reset the Io_Command field every time I want to reuse the IoRequest ?


No you dont. But I recommmend you reset it anyway.

Quote

What about when creating new requests from one that is being served, can I just AllocMem() sizeof the request and copy over the first one ?


Copy IORequest when it is not being used.
Title: Re: IoRequest resetting
Post by: Jose on August 13, 2005, 02:55:52 PM
Any special reason ? I like to know why... It seems to work here like I described (yes I'm stubborn:))

Title: Re: IoRequest resetting
Post by: Thomas on August 13, 2005, 05:37:11 PM

"In use" means between SendIO and WaitIO.

It is always a bad idea to access storage that does not belong to your task and with SendIO you send the request to another task.

After it has been returned, you can access it again. You can safely copy it after OpenDevice or between DoIOs.

Bye,
Thomas
Title: Re: IoRequest resetting
Post by: Jose on August 13, 2005, 08:57:07 PM
Ok ok.... it's just more cumbersome to do:). I guess I'll have to make a request from which others are copied when I want to send one...