source: rtems/c/src/libchip/shmdr/poll.c @ 12f86efd

4.104.114.84.95
Last change on this file since 12f86efd was 12f86efd, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 11, 1995 at 2:23:49 PM

minor clean up -- switched to memset for zero'ing SHM

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*  void Shm_Poll()
2 *
3 *  This routine polls to see if a packet has arrived.  If one
4 *  has it informs the executive.  It is typically called from
5 *  the clock tick interrupt service routine.
6 *
7 *  Input parameters:  NONE
8 *
9 *  Output parameters: NONE
10 *
11 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
12 *  On-Line Applications Research Corporation (OAR).
13 *  All rights assigned to U.S. Government, 1994.
14 *
15 *  This material may be reproduced by or for the U.S. Government pursuant
16 *  to the copyright license under the clause at DFARS 252.227-7013.  This
17 *  notice must appear in all copies of this file and its derivatives.
18 *
19 *  poll.c,v 1.2 1995/05/09 20:22:57 joel Exp
20 */
21
22#include <rtems.h>
23#include <rtems/sysstate.h>
24#include "shm.h"
25#include "clockdrv.h"
26
27void Shm_Poll()
28{
29  rtems_unsigned32 tmpfront;
30
31  Clock_isr( 0 );             /* invoke standard clock ISR */
32
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 ) {
48        rtems_multiprocessing_announce();
49        Shm_Interrupt_count++;
50      }
51  }
52}
Note: See TracBrowser for help on using the repository browser.