Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
135 user(s) are online (120 user(s) are browsing Forums)

Members: 0
Guests: 135

more...

Support us!

Headlines

 
  Register To Post  

Anonymous
IORequests allocation and cloning
I want to send some requests to timer.device, but more than one at once. The usual way on OS 3.x is to allocate one request with CreateIORequest(), open a device with it, then, if more than one request is needed, make clones with just AllocMem() and CopyMem().

When I'm looking into "AmigaOS 4 migration guide", I can see that CreateMsgPort() and CreateIORequest() are replaced with AllocSysObject[Tags](). Does it mean the former functions do not work? As I compile for MorphOS and AmigaOS 3 from the same source, I want to reduce conditional compiling as much as possible.

Then request cloning. The example in the migration guide uses one request. How should I make clones? If in traditional way, what flags for AllocMem() (I guess MEMF_SHARED, but not sure)?

I wait for requests to be completed in a big loop, which checks multiple ports. Then I can't use WaitIO() but use Wait() and then check signal mask. The result is that request stays in the port queue. Can I remove it with GetMsg() just like an ordinary message?

Go to top
Re: IORequests allocation and cloning
Not too shy to talk
Not too shy to talk


See User information
@krashan

The proper OS4 way to allocate the first one is:

myiorequest AllocSysObjectTagsASOT_IOREQUEST,
                
ASIOR_Size,      size,
                
ASIOR_ReplyPortport,
                
TAG_DONE );


Then allocate the clone:

myioreq2 AllocSysObjectTagsASOT_IOREQUEST,
             
ASIOR_Duplicatemyiorequest,
             
TAG_DONE );

Go to top
Re: IORequests allocation and cloning
Not too shy to talk
Not too shy to talk


See User information
edit: duplicate post removed.

Go to top
Re: IORequests allocation and cloning
Quite a regular
Quite a regular


See User information
@xeron

It seems we need an updated SDK for that, in the latest public SDK we only have ASOIOR_Size and ASOIOR_ReplyPort

Back to a quiet home... At last
Go to top
Re: IORequests allocation and cloning
Not too shy to talk
Not too shy to talk


See User information
@abalaban

Really? Oh that sucks.

Well, in that case, carry on with the OS3.x way until the new SDK...

Go to top
Re: IORequests allocation and cloning
Quite a regular
Quite a regular


See User information
@xeron

As a remainder the latest public SDK was delivered on April, 10th. 2006 a while back. Since then I imagine there was a huge work

Back to a quiet home... At last
Go to top
Re: IORequests allocation and cloning
Just can't stay away
Just can't stay away


See User information
@krashan

Quote:

When I'm looking into "AmigaOS 4 migration guide", I can see that CreateMsgPort() and CreateIORequest() are replaced with AllocSysObject[Tags](). Does it mean the former functions do not work? As I compile for MorphOS and AmigaOS 3 from the same source, I want to reduce conditional compiling as much as possible.


Of course they still work. They are just implemented as wrappers for the new extended functions much like f.e. OldOpenLibrary() in classic AmigaOS is implemented simply as a call to OpenLibrary(libname, 0).

Other similar cases are f.e. OpenWindow()/OpenWindowTagList(), OpenScreen()/OpenScreenTagList() and CreateProc()/CreateNewProc().

Any structures that need to be accessed by more than one program (like IORequests f.e.) should be allocated as MEMF_SHARED.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project