knowledge-database (beta)

Current group: comp.soft-sys.ace

[ace-users] RE: Stream Task member calls not working

[ace-users] RE: Stream Task member calls not working  
David Hawkins
From:David Hawkins
Subject:[ace-users] RE: Stream Task member calls not working
Date:21 Jan 2005 19:19:01 -0600

Hi,

> In the process of trying to write a streams test, I found
> that the task's within a module are not getting their
> sibling(), is_reader(), and is_writer() member functions
> setup correctly.
>
> I am assuming that these functions are initialized
> when the module is constructed, since they are
> only meaningful in that context.
>
> If I create a task, a module containing two of those
> tasks, and a stream with that module, then I find that
> the ACE_Module reader(), writer(), and sibling()
> members are initialized ok.
>
> ....
>
> I'll go off and look at the ACE_Module implementation now, but
> figured I'd see if anyone had some feedback.

I had a look at the Module.cpp code and the module code
sets up its reader()/writer()/sibling() code as would
be expected.

The calls for ACE_Module::writer/reader set or clear
flags down in the task and set the task mod_ pointer
to 'this' (making the task point back to the module
that contains it).

ACE_Module::open calls this->reader/writer, and sets
up the back pointers during the last step, so calling
open directly should establish the link between the
module and its two tasks ok. And then finally, using
the constructor directly (like I did) calls open,
so that should work too!

What am I missing here?

I'll try the debugger I guess ...

Dave
   

Copyright © 2006 knowledge-database   -   All rights reserved