diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-02-11 22:58:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-02-11 22:58:08 +0000 |
commit | 83e36d6bb77038d01d07bdf62a3037a01284bfdb (patch) | |
tree | 690dbc3ebc087fad82af7777b5f355eabb1e4343 /cpukit/libnetworking/rtems | |
parent | 2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-83e36d6bb77038d01d07bdf62a3037a01284bfdb.tar.bz2 |
2003-02-11 Mike Siers <mikes@poliac.com>
* rtems/rtems_glue.c: A small patch to the network daemon task
code. I just added code to check the return value of
the rtems_bsdnet_event_receive function. Only when
this function returns a SUCCESSFUL status, will the
event flags be checked. This is more of a code cleanup issue
than a bug. The patch will just ensure the ipintr() and
arpintr() functions are only called when a event is signaled.
Diffstat (limited to 'cpukit/libnetworking/rtems')
-rw-r--r-- | cpukit/libnetworking/rtems/rtems_glue.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c index cf3b0925c8..4ed1455cff 100644 --- a/cpukit/libnetworking/rtems/rtems_glue.c +++ b/cpukit/libnetworking/rtems/rtems_glue.c @@ -503,6 +503,7 @@ rtems_bsdnet_schednetisr (int n) static void networkDaemon (void *task_argument) { + rtems_status_code sc; rtems_event_set events; rtems_interval now; int ticksPassed; @@ -515,14 +516,18 @@ networkDaemon (void *task_argument) timeout = c->c_time; else timeout = RTEMS_NO_TIMEOUT; - rtems_bsdnet_event_receive (NETISR_EVENTS, + + sc = rtems_bsdnet_event_receive (NETISR_EVENTS, RTEMS_EVENT_ANY | RTEMS_WAIT, timeout, &events); - if (events & NETISR_IP_EVENT) - ipintr (); - if (events & NETISR_ARP_EVENT) - arpintr (); + if ( sc == RTEMS_SUCCESSFUL ) { + if (events & NETISR_IP_EVENT) + ipintr (); + if (events & NETISR_ARP_EVENT) + arpintr (); + } + rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); ticksPassed = now - ticksWhenCalloutsLastChecked; if (ticksPassed != 0) { |