1
1
openmpi/ompi/mca/rcache/rcache.h
Jeff Squyres 0af7ac53f2 Fixes trac:1392, #1400
* add "register" function to mca_base_component_t
   * converted coll:basic and paffinity:linux and paffinity:solaris to
     use this function
   * we'll convert the rest over time (I'll file a ticket once all
     this is committed)
 * add 32 bytes of "reserved" space to the end of mca_base_component_t
   and mca_base_component_data_2_0_0_t to make future upgrades
   [slightly] easier
   * new mca_base_component_t size: 196 bytes
   * new mca_base_component_data_2_0_0_t size: 36 bytes
 * MCA base version bumped to v2.0
   * '''We now refuse to load components that are not MCA v2.0.x'''
 * all MCA frameworks versions bumped to v2.0
 * be a little more explicit about version numbers in the MCA base
   * add big comment in mca.h about versioning philosophy

This commit was SVN r19073.

The following Trac tickets were found above:
  Ticket 1392 --> https://svn.open-mpi.org/trac/ompi/ticket/1392
2008-07-28 22:40:57 +00:00

99 строки
3.2 KiB
C

/* -*- Mode: C; c-basic-offset:4 ; -*- */
/**
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file
* Description of the Registration Cache framework
*/
#ifndef MCA_RCACHE_H
#define MCA_RCACHE_H
#include "opal/mca/mca.h"
#include "ompi/info/info.h"
#include "opal/class/opal_list.h"
#include "ompi/mca/mpool/mpool.h"
#include "opal/threads/mutex.h"
/**
* component initialize
*/
typedef struct mca_rcache_base_module_t* (*mca_rcache_base_component_init_fn_t)(void);
typedef int (*mca_rcache_base_module_find_fn_t) (
struct mca_rcache_base_module_t* rcache, void* addr, size_t size,
mca_mpool_base_registration_t **reg);
typedef int (*mca_rcache_base_module_find_all_fn_t)(
struct mca_rcache_base_module_t* rcache, void* addr, size_t size,
mca_mpool_base_registration_t **regs, int reg_cnt);
typedef int (*mca_rcache_base_module_insert_fn_t)(
struct mca_rcache_base_module_t* rcache,
mca_mpool_base_registration_t* registration, size_t limit);
typedef int (*mca_rcache_base_module_delete_fn_t)(
struct mca_rcache_base_module_t* rcache,
mca_mpool_base_registration_t* registration);
/**
* finalize
*/
typedef void (*mca_rcache_base_module_finalize_fn_t)(
struct mca_rcache_base_module_t*);
/**
* rcache component descriptor. Contains component version information and
* open/close/init functions
*/
struct mca_rcache_base_component_2_0_0_t{
mca_base_component_t rcache_version; /**< version */
mca_base_component_data_t rcache_data; /**<metadata */
mca_rcache_base_component_init_fn_t rcache_init; /**<init function */
};
typedef struct mca_rcache_base_component_2_0_0_t mca_rcache_base_component_2_0_0_t;
typedef struct mca_rcache_base_component_2_0_0_t mca_rcache_base_component_t;
/**
* rcache module descriptor
*/
struct mca_rcache_base_module_t {
mca_rcache_base_component_t *rcache_component; /**< component struct */
mca_rcache_base_module_find_fn_t rcache_find;
mca_rcache_base_module_find_all_fn_t rcache_find_all;
mca_rcache_base_module_insert_fn_t rcache_insert;
mca_rcache_base_module_delete_fn_t rcache_delete;
mca_rcache_base_module_finalize_fn_t rcache_finalize;
opal_mutex_t lock;
};
typedef struct mca_rcache_base_module_t mca_rcache_base_module_t;
/**
* Macro for use in components that are of type rcache
*/
#define MCA_RCACHE_BASE_VERSION_2_0_0 \
MCA_BASE_VERSION_2_0_0, \
"rcache", 2, 0, 0
#endif /* MCA_RCACHE_H */