1
1
/*
2
- * Copyright © 2013-2018 Inria. All rights reserved.
2
+ * Copyright © 2013-2023 Inria. All rights reserved.
3
3
* See COPYING in top-level directory.
4
4
*/
5
5
@@ -48,6 +48,8 @@ extern "C" {
48
48
* This length (in bytes) must be used in hwloc_shmem_topology_write()
49
49
* and hwloc_shmem_topology_adopt() later.
50
50
*
51
+ * \return the length, or -1 on error, for instance if flags are invalid.
52
+ *
51
53
* \note Flags \p flags are currently unused, must be 0.
52
54
*/
53
55
HWLOC_DECLSPEC int hwloc_shmem_topology_get_length (hwloc_topology_t topology ,
@@ -74,9 +76,10 @@ HWLOC_DECLSPEC int hwloc_shmem_topology_get_length(hwloc_topology_t topology,
74
76
* is not. However the caller may also allocate it manually in shared memory
75
77
* to share it as well.
76
78
*
77
- * \return -1 with errno set to EBUSY if the virtual memory mapping defined
79
+ * \return 0 on success.
80
+ * \return -1 with errno set to \c EBUSY if the virtual memory mapping defined
78
81
* by \p mmap_address and \p length isn't available in the process.
79
- * \return -1 with errno set to EINVAL if \p fileoffset, \p mmap_address
82
+ * \return -1 with errno set to \c EINVAL if \p fileoffset, \p mmap_address
80
83
* or \p length aren't page-aligned.
81
84
*/
82
85
HWLOC_DECLSPEC int hwloc_shmem_topology_write (hwloc_topology_t topology ,
@@ -112,14 +115,16 @@ HWLOC_DECLSPEC int hwloc_shmem_topology_write(hwloc_topology_t topology,
112
115
*
113
116
* \note This function takes care of calling hwloc_topology_abi_check().
114
117
*
115
- * \return -1 with errno set to EBUSY if the virtual memory mapping defined
118
+ * \return 0 on success.
119
+ *
120
+ * \return -1 with errno set to \c EBUSY if the virtual memory mapping defined
116
121
* by \p mmap_address and \p length isn't available in the process.
117
122
*
118
- * \return -1 with errno set to EINVAL if \p fileoffset, \p mmap_address
123
+ * \return -1 with errno set to \c EINVAL if \p fileoffset, \p mmap_address
119
124
* or \p length aren't page-aligned, or do not match what was given to
120
125
* hwloc_shmem_topology_write() earlier.
121
126
*
122
- * \return -1 with errno set to EINVAL if the layout of the topology structure
127
+ * \return -1 with errno set to \c EINVAL if the layout of the topology structure
123
128
* is different between the writer process and the adopter process.
124
129
*/
125
130
HWLOC_DECLSPEC int hwloc_shmem_topology_adopt (hwloc_topology_t * topologyp ,
0 commit comments