"Fossies" - the Fresh Open Source Software Archive

Member "openpa-1.0.4/src/opa_queue.c" (5 Dec 2012, 947 Bytes) of package /linux/misc/openpa-1.0.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "opa_queue.c" see the Fossies "Dox" file reference documentation.

    1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
    2 /*  
    3  *  (C) 2008 by Argonne National Laboratory.
    4  *      See COPYRIGHT in top-level directory.
    5  */
    6 
    7 /* FIXME remove MPI error code references in a meaningful way */
    8 
    9 #include "opa_queue.h"
   10 
   11 char *OPA_Shm_asymm_base_addr = (char *)(OPA_SHM_ASYMM_NULL_VAL);
   12 
   13 int OPA_Shm_asymm_init(char *base)
   14 {
   15     int mpi_errno = 0/*MPI_SUCCESS*/;
   16 
   17     if (OPA_Shm_asymm_base_addr != (char *)OPA_SHM_ASYMM_NULL_VAL) {
   18         /* the _base_addr has already been initialized */
   19         mpi_errno = 16/*MPI_ERR_INTERN*/;
   20         goto fn_exit;
   21     }
   22 
   23     OPA_Shm_asymm_base_addr = base;
   24 
   25 fn_exit:
   26     return mpi_errno;
   27 }
   28 
   29 void OPA_Queue_init(OPA_Queue_info_t *qhead)
   30 {
   31     OPA_SHM_SET_REL_NULL((qhead)->head);
   32     OPA_SHM_SET_REL_NULL((qhead)->tail);
   33     OPA_SHM_SET_REL_NULL((qhead)->shadow_head);
   34 }
   35 
   36 void OPA_Queue_header_init(OPA_Queue_element_hdr_t *hdr)
   37 {
   38     OPA_SHM_SET_REL_NULL(hdr->next);
   39 }
   40