[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: [cdt-dev] EDC and asynchronous operations
 | 
Ah....OK. I was under the impression that a transaction operated on a 
static set of cache objects. Eugene's example earlier did not show 
dynamically defined cache objects, probably because my description of 
my use case did not stipulate that C, D, E, etc where dynamic data 
points (e.g, the contents of memory at some location not yet known). 
Anyway, the example below clears things up for me. I have more 
questions I'll answer looking at TCF code, but I think I have enough 
of an understanding now to be hopeful that I can use ACPM to improve 
the situation in EDC.
Thanks to you and Eugene for helping me sort this out.
John
At 04:23 PM 10/12/2010, Burton, Felix wrote:
Regarding 1: I don't understand what you mean.  The following is 
simplified pseudo code that count number of frame on a stack by 
following a frame pointer list.
Boolean countStackFrames(Context ctx) {
                TCFDataCache<Register> fp = lookupRegisterCI(ctx, 
REGISTER_FP);
                if (!fp.validate(this)) {
                                fp.wait(this);
                                return false;
                }
                Address addr = fp.getData().valueAsAddress();
                long count = 0;
                while (addr != 0) {
                                TCFDataCache<Memory> mem = 
lookupMemoryCI(ctx, addr, address_size);
                                if (!mem.validate(this)) {
                                                mem.wait(this);
                                                return false;
                                }
                                addr = mem.getData().valueAsAddress();
                                count++;
                }
                set(null, null, count);
                return true;
}