root/opal/mca/btl/vader/btl_vader_frag.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. mca_btl_vader_frag_constructor
  2. mca_btl_vader_frag_init

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2009 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2009      Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * Copyright (c) 2018      Triad National Security, LLC. All rights
  17  *                         reserved.
  18  * $COPYRIGHT$
  19  *
  20  * Additional copyrights may follow
  21  *
  22  * $HEADER$
  23  */
  24 
  25 #include "opal_config.h"
  26 
  27 #include "btl_vader.h"
  28 #include "btl_vader_frag.h"
  29 
  30 static inline void mca_btl_vader_frag_constructor (mca_btl_vader_frag_t *frag)
  31 {
  32     frag->hdr = (mca_btl_vader_hdr_t*)frag->base.super.ptr;
  33     if(frag->hdr != NULL) {
  34         frag->hdr->frag = frag;
  35         frag->hdr->flags = 0;
  36         frag->segments[0].seg_addr.pval = (char *)(frag->hdr + 1);
  37     }
  38 
  39     frag->base.des_segments      = frag->segments;
  40     frag->base.des_segment_count = 1;
  41 }
  42 
  43 int mca_btl_vader_frag_init (opal_free_list_item_t *item, void *ctx)
  44 {
  45     mca_btl_vader_frag_t *frag = (mca_btl_vader_frag_t *) item;
  46 
  47     /* Set the list element here so we don't have to set it on the critical path */
  48     frag->my_list = (opal_free_list_t *) ctx;
  49 
  50     return OPAL_SUCCESS;
  51 }
  52 
  53 OBJ_CLASS_INSTANCE(mca_btl_vader_frag_t, mca_btl_base_descriptor_t,
  54                    mca_btl_vader_frag_constructor, NULL);

/* [<][>][^][v][top][bottom][index][help] */