Blame src/mpi/romio/mpl/include/mpl_shm_mmap.h

Packit Service c5cf8c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
Packit Service c5cf8c
/* vim: set ft=c.mpich : */
Packit Service c5cf8c
/*
Packit Service c5cf8c
 *  (C) 2016 by Argonne National Laboratory.
Packit Service c5cf8c
 *      See COPYRIGHT in top-level directory.
Packit Service c5cf8c
 */
Packit Service c5cf8c
#ifndef MPL_SHM_MMAP_H_INCLUDED
Packit Service c5cf8c
#define MPL_SHM_MMAP_H_INCLUDED
Packit Service c5cf8c
Packit Service c5cf8c
typedef intptr_t MPLI_shm_lhnd_t;
Packit Service c5cf8c
Packit Service c5cf8c
typedef char *MPLI_shm_ghnd_t;
Packit Service c5cf8c
/* The local handle, lhnd, is valid only for the current process,
Packit Service c5cf8c
 * The global handle, ghnd, is valid across multiple processes
Packit Service c5cf8c
 * The handle flag, flag, is used to set various attributes of the
Packit Service c5cf8c
 *  handle.
Packit Service c5cf8c
 */
Packit Service c5cf8c
typedef struct MPLI_shm_lghnd_t {
Packit Service c5cf8c
    MPLI_shm_lhnd_t lhnd;
Packit Service c5cf8c
    MPLI_shm_ghnd_t ghnd;
Packit Service c5cf8c
    int flag;
Packit Service c5cf8c
} MPLI_shm_lghnd_t;
Packit Service c5cf8c
Packit Service c5cf8c
typedef MPLI_shm_lghnd_t *MPL_shm_hnd_t;
Packit Service c5cf8c
Packit Service c5cf8c
#define MPL_SHM_FNAME_LEN      50
Packit Service c5cf8c
#define MPLI_SHM_GHND_SZ       MPL_SHM_FNAME_LEN
Packit Service c5cf8c
#define MPLI_SHM_LHND_INVALID  (-1)
Packit Service c5cf8c
#define MPLI_SHM_LHND_INIT_VAL (-1)
Packit Service c5cf8c
Packit Service c5cf8c
#define MPLI_SHM_SEG_ALREADY_EXISTS EEXIST
Packit Service c5cf8c
Packit Service c5cf8c
/* Returns MPL_SHM_SUCCESS on success, MPL_SHM_EINTERN on error */
Packit Service c5cf8c
int MPLI_shm_lhnd_close(MPL_shm_hnd_t hnd);
Packit Service c5cf8c
Packit Service c5cf8c
#endif /* MPL_SHM_MMAP_H_INCLUDED */