Welcome, Guest. Please login or register.

Author Topic: IoRequest resetting  (Read 953 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2869
    • Show only replies by Jose
IoRequest resetting
« 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:
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: IoRequest resetting
« Reply #1 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.
My Amigas: A500, Mac Mini and PowerBook
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2869
    • Show only replies by Jose
Re: IoRequest resetting
« Reply #2 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:))

\\"We made Amiga, they {bleep}ed it up\\"
 

Online Thomas

Re: IoRequest resetting
« Reply #3 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

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2869
    • Show only replies by Jose
Re: IoRequest resetting
« Reply #4 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...
\\"We made Amiga, they {bleep}ed it up\\"