root/opal/mca/pmix/pmix4x/pmix/src/mca/common/dstore/dstore_segment.h

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

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
   3  * Copyright (c) 2016      IBM Corporation.  All rights reserved.
   4  * Copyright (c) 2016-2017 Mellanox Technologies, Inc.
   5  *                         All rights reserved.
   6  * Copyright (c) 2018      Research Organization for Information Science
   7  *                         and Technology (RIST).  All rights reserved.
   8  *
   9  * $COPYRIGHT$
  10  *
  11  * Additional copyrights may follow
  12  *
  13  * $HEADER$
  14  */
  15 
  16 #include <src/include/pmix_config.h>
  17 #include <pmix_common.h>
  18 
  19 #include "src/include/pmix_globals.h"
  20 #include "src/mca/gds/base/base.h"
  21 #include "src/mca/pshmem/base/base.h"
  22 
  23 #include "dstore_common.h"
  24 
  25 #ifndef DSTORE_SEGMENT_H
  26 #define DSTORE_SEGMENT_H
  27 
  28 /* this structs are used to store information about
  29  * shared segments addresses locally at each process,
  30  * so they are common for different types of segments
  31  * and don't have a specific content (namespace's info,
  32  * rank's meta info, ranks's data). */
  33 
  34 typedef struct pmix_dstore_seg_desc_t pmix_dstore_seg_desc_t;
  35 
  36 typedef enum {
  37     PMIX_DSTORE_INITIAL_SEGMENT,
  38     PMIX_DSTORE_NS_META_SEGMENT,
  39     PMIX_DSTORE_NS_DATA_SEGMENT,
  40     PMIX_DSTORE_NS_LOCK_SEGMENT,
  41 } pmix_dstore_segment_type;
  42 
  43 struct pmix_dstore_seg_desc_t {
  44     pmix_dstore_segment_type type;
  45     pmix_pshmem_seg_t seg_info;
  46     uint32_t id;
  47     pmix_dstore_seg_desc_t *next;
  48 };
  49 
  50 PMIX_EXPORT int pmix_common_dstor_getpagesize(void);
  51 PMIX_EXPORT size_t pmix_common_dstor_getcacheblocksize(void);
  52 PMIX_EXPORT void pmix_common_dstor_init_segment_info(size_t initial_segment_size,
  53                         size_t meta_segment_size,
  54                         size_t data_segment_size);
  55 PMIX_EXPORT pmix_dstore_seg_desc_t *pmix_common_dstor_create_new_segment(pmix_dstore_segment_type type,
  56                         const char *base_path, const char *name, uint32_t id,
  57                         uid_t uid, bool setuid);
  58 PMIX_EXPORT pmix_dstore_seg_desc_t *pmix_common_dstor_attach_new_segment(pmix_dstore_segment_type type,
  59                         const char *base_path,
  60                         const char *name, uint32_t id);
  61 PMIX_EXPORT pmix_dstore_seg_desc_t *pmix_common_dstor_extend_segment(pmix_dstore_seg_desc_t *segdesc,
  62                         const char *base_path,
  63                         const char *name, uid_t uid, bool setuid);
  64 PMIX_EXPORT void pmix_common_dstor_delete_sm_desc(pmix_dstore_seg_desc_t *desc);
  65 PMIX_EXPORT pmix_dstore_seg_desc_t *pmix_common_dstor_create_new_lock_seg(const char *base_path, size_t size,
  66                         const char *name, uint32_t id, uid_t uid, bool setuid);
  67 PMIX_EXPORT pmix_dstore_seg_desc_t *pmix_common_dstor_attach_new_lock_seg(const char *base_path,
  68                         size_t size, const char *name, uint32_t id);
  69 
  70 #endif // DSTORE_SEGMENT_H

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