Changeset 88d594a in rtems for c/src/lib/libbsp/shmdr/poll.c


Ignore:
Timestamp:
05/24/95 21:39:42 (29 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
5b9d6ddf
Parents:
bf61e45c
Message:

Fully tested on all in-house targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shmdr/poll.c

    rbf61e45c r88d594a  
    1717 *  notice must appear in all copies of this file and its derivatives.
    1818 *
    19  *  $Id$
     19 *  poll.c,v 1.2 1995/05/09 20:22:57 joel Exp
    2020 */
    2121
    2222#include <rtems.h>
     23#include <rtems/sysstate.h>
    2324#include "shm.h"
    2425#include "clockdrv.h"
     
    3031  Clock_isr( 0 );             /* invoke standard clock ISR */
    3132
    32   /* enable_tracing(); */
    33   /* ticks += 1; */
    34   Shm_Lock( Shm_Local_receive_queue );
    35     tmpfront = Shm_Local_receive_queue->front;
    36   Shm_Unlock( Shm_Local_receive_queue );
    37   if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
    38   rtems_multiprocessing_announce();
    39   Shm_Interrupt_count++;
     33
     34  /*
     35   * Check for msgs only if we are "up"
     36   * This avoids a race condition where we may get a clock
     37   * interrupt before MPCI has completed its init
     38   */
     39 
     40  if (_System_state_Is_up(_System_state_Get()))
     41  {
     42      /* enable_tracing(); */
     43      /* ticks += 1; */
     44      Shm_Lock( Shm_Local_receive_queue );
     45      tmpfront = Shm_Local_receive_queue->front;
     46      Shm_Unlock( Shm_Local_receive_queue );
     47      if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
     48      rtems_multiprocessing_announce();
     49      Shm_Interrupt_count++;
     50  }
    4051}
Note: See TracChangeset for help on using the changeset viewer.