[PATCH] how to fix shmdr for POLLING? [was: Re: PSIM and MP tests -- anybody got working?]

Karel Gardas kgardas at objectsecurity.com
Tue Jan 24 21:20:01 UTC 2006

On Tue, 24 Jan 2006, Joel Sherrill wrote:

> Karel Gardas wrote:
>> On Mon, 23 Jan 2006, Joel Sherrill wrote:
>>> I was afraid of this.  shmdr has not been used with new execption model
>>> and assumes it can "wrap" the clock tick driver ISR.  It was written 
>>> before
>>> the Timer Manager exists.  Instead of its clock tick ISR trick, it should 
>>> install
>>> an RTEMS timer to run once a tick when polled.
>> If I understand this well, then the code should looks like in diff below, 
>> but the problem is that then Shm_Poll seems to be run too often (just my 
>> idea), since I usually end with consumed amount of instructions/time... 
>> Even if I go with 1000 clicks, it's still the same, but test at least runs 
>> some functionality. I guess my task setup is wrong...
> Each click is an instruction in the simulator so the clicks per tick must be 
> relatively high to
> allow for positive movement in the test.

Is 100000 enough high?

> Do you have a functional gdb?

I hope so.

> Can you dump the shm?


>> Do you have any idea how to fix this?
> Only if I could peek inside with gdb. :)
> FWIW I think your idea of moving to a polling task is better than using a 
> Timer.

Erm, in fact I've though you have this in mind talking about timers... :-)

> There is already an MPCI task in RTEMS waiting for requests so when this is 
> working it would be even better to let him poll directly.  That would 
> eliminate overhead.

Good idea,

Karel Gardas                  kgardas at objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com

More information about the users mailing list