Ignore:
Timestamp:
Dec 19, 1995, 8:26:32 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
4442d21c
Parents:
7593d56c
Message:

changes remerged after disk crash -- history lost

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c

    r7593d56c r8bdcfc4  
    1 /*  void Shm_get_config( localnode, &shmcfg )
    2  *
    3  *  This routine initializes, if necessary, and returns a pointer
    4  *  to the Shared Memory Configuration Table for the UNIX
    5  *  simulator.
    6  *
    7  *  INPUT PARAMETERS:
    8  *    localnode - local node number
    9  *    shmcfg    - address of pointer to SHM Config Table
    10  *
    11  *  OUTPUT PARAMETERS:
    12  *    *shmcfg   - pointer to SHM Config Table
    13  *
    14  *  NOTES:  This driver is capable of supporting a practically unlimited
    15  *          number of nodes.
    16  *
    17  *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
    18  *  On-Line Applications Research Corporation (OAR).
    19  *  All rights assigned to U.S. Government, 1994.
    20  *
    21  *  This material may be reproduced by or for the U.S. Government pursuant
    22  *  to the copyright license under the clause at DFARS 252.227-7013.  This
    23  *  notice must appear in all copies of this file and its derivatives.
    24  *
    25  *  $Id$
    26  */
    27 
    28 #include <bsp.h>
    29 #include <shm.h>
    30 
    31 shm_config_table BSP_shm_cfgtbl;
    32 
    33 int              semid;
    34 
    35 void Shm_Cause_interrupt_unix(
    36   rtems_unsigned32 node
    37 );
    38 
    39 void Shm_Get_configuration(
    40   rtems_unsigned32   localnode,
    41   shm_config_table **shmcfg
    42 )
    43 {
    44   _CPU_SHM_Init(
    45     Shm_Maximum_nodes,
    46     Shm_Is_master_node(),
    47     (void **)&BSP_shm_cfgtbl.base,
    48     (unsigned32 *)&BSP_shm_cfgtbl.length
    49   );
    50 
    51   BSP_shm_cfgtbl.format       = SHM_BIG;
    52 
    53   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt_unix;
    54 
    55 #ifdef NEUTRAL_BIG
    56   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
    57 #else
    58   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
    59 #endif
    60 
    61   if ( _CPU_SHM_Get_vector() ) {
    62     BSP_shm_cfgtbl.poll_intr    = INTR_MODE;
    63     BSP_shm_cfgtbl.Intr.address = (vol_u32 *) _CPU_Get_pid(); /* process id */
    64     BSP_shm_cfgtbl.Intr.value   = _CPU_SHM_Get_vector();  /* signal to send */
    65     BSP_shm_cfgtbl.Intr.length  = LONG;
    66   } else {
    67     BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
    68     BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
    69     BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
    70     BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
    71   }
    72 
    73   *shmcfg = &BSP_shm_cfgtbl;
    74 }
Note: See TracChangeset for help on using the changeset viewer.