RTEMS event send/receive - events apparently lost.

Nick.SIMON at syntegra.bt.co.uk Nick.SIMON at syntegra.bt.co.uk
Wed Mar 21 12:57:22 UTC 2001


Is anyone aware of a problem in events in rtems 4.5.0 beta 3a?

I have a task which waits for time and frame events like this:

        while(1)
        {
            rtems_event_set got;
            
            sc = rtems_event_receive(ITS_ETH_EVENT | ITS_TIM_EVENT,
                RTEMS_WAIT | RTEMS_EVENT_ANY,
                0,
                &got);

            // Process incoming ethernet packets
            if(got & ITS_ETH_EVENT)
            {
                // Received one or more packets
                int len;
                
                while((len = pkt.pktRcv()) != 0)
                    if(pkt.isCbpId())
                        pkt.dispatch();
                    else
                        printf("ITS - unrecognised packet header.\n");
            }
            
            // Process timer tick
            if(got & ITS_TIM_EVENT)
            {
                TimerManager::instance()->tick();
            }
        }   // end main event loop

On occasion we seem to miss ITS_ETH_EVENTs (we may also be missing TIM
events, I don't know), possibly as a result of the two events being sent in
close time proximity to each other.

The ETH event is sent by another task, and the TIM event is from a timer
service routine (is that an issue?).

Is anyone else aware of a problem in this area?  Processor is mpc860, and
BSP is based on eth-comm BTW.  I can work around this by always checking for
incoming frames instead of testing the event flag (i.e. lose the line
"if(got & ITS_ETH_EVENT)").

TIA,

-- Nick Simon 


******************************************************************************

Check us out at http://www.syntegra.com

***********************************************************************



More information about the users mailing list