@@ -119,44 +119,38 @@ struct hg_init_info {
119
119
unsigned int multi_recv_copy_threshold ;
120
120
};
121
121
122
- /* Keep offset to keep room for additional NA error codes */
123
- #define HG_NA_ERRNO_OFFSET 64
124
-
125
122
/* Error return codes:
126
123
* Functions return 0 for success or corresponding return code */
127
124
#define HG_RETURN_VALUES \
128
- X(HG_SUCCESS, NA_SUCCESS) /*!< operation succeeded */ \
129
- X (HG_PERMISSION , NA_PERMISSION ) /*!< operation not permitted */ \
130
- X (HG_NOENTRY , NA_NOENTRY ) /*!< no such file or directory */ \
131
- X (HG_INTERRUPT , NA_INTERRUPT ) /*!< operation interrupted */ \
132
- X (HG_AGAIN , NA_AGAIN ) /*!< operation must be retried */ \
133
- X (HG_NOMEM , NA_NOMEM ) /*!< out of memory */ \
134
- X (HG_ACCESS , NA_ACCESS ) /*!< permission denied */ \
135
- X (HG_FAULT , NA_FAULT ) /*!< bad address */ \
136
- X (HG_BUSY , NA_BUSY ) /*!< device or resource busy */ \
137
- X (HG_EXIST , NA_EXIST ) /*!< entry already exists */ \
138
- X (HG_NODEV , NA_NODEV ) /*!< no such device */ \
139
- X (HG_INVALID_ARG , NA_INVALID_ARG ) /*!< invalid argument */ \
140
- X (HG_PROTOCOL_ERROR , NA_PROTOCOL_ERROR ) /*!< protocol error */ \
141
- X (HG_OVERFLOW , NA_OVERFLOW ) /*!< value too large */ \
142
- X (HG_MSGSIZE , NA_MSGSIZE ) /*!< message size too long */ \
143
- X (HG_PROTONOSUPPORT , NA_PROTONOSUPPORT ) /*!< protocol not supported */ \
144
- X (HG_OPNOTSUPPORTED , \
145
- NA_OPNOTSUPPORTED ) /*!< operation not supported on endpoint */ \
146
- X (HG_ADDRINUSE , NA_ADDRINUSE ) /*!< address already in use */ \
147
- X (HG_ADDRNOTAVAIL , \
148
- NA_ADDRNOTAVAIL ) /*!< cannot assign requested address */ \
149
- X (HG_HOSTUNREACH , \
150
- NA_HOSTUNREACH ) /*!< cannot reach host during operation */ \
151
- X (HG_TIMEOUT , NA_TIMEOUT ) /*!< operation reached timeout */ \
152
- X (HG_CANCELED , NA_CANCELED ) /*!< operation canceled */ \
153
- X (HG_IO_ERROR , NA_IO_ERROR ) /*!< I/O error */ \
154
- X (HG_CHECKSUM_ERROR , HG_NA_ERRNO_OFFSET ) /*!< checksum error */ \
155
- X (HG_NA_ERROR , HG_NA_ERRNO_OFFSET + 1 ) /*!< generic NA error */ \
156
- X (HG_OTHER_ERROR , HG_NA_ERRNO_OFFSET + 2 ) /*!< generic HG error */ \
157
- X (HG_RETURN_MAX , HG_NA_ERRNO_OFFSET + 3 )
158
-
159
- #define X (a , b ) a = b,
125
+ X(HG_SUCCESS) /*!< operation succeeded */ \
126
+ X (HG_PERMISSION ) /*!< operation not permitted */ \
127
+ X (HG_NOENTRY ) /*!< no such file or directory */ \
128
+ X (HG_INTERRUPT ) /*!< operation interrupted */ \
129
+ X (HG_AGAIN ) /*!< operation must be retried */ \
130
+ X (HG_NOMEM ) /*!< out of memory */ \
131
+ X (HG_ACCESS ) /*!< permission denied */ \
132
+ X (HG_FAULT ) /*!< bad address */ \
133
+ X (HG_BUSY ) /*!< device or resource busy */ \
134
+ X (HG_EXIST ) /*!< entry already exists */ \
135
+ X (HG_NODEV ) /*!< no such device */ \
136
+ X (HG_INVALID_ARG ) /*!< invalid argument */ \
137
+ X (HG_PROTOCOL_ERROR ) /*!< protocol error */ \
138
+ X (HG_OVERFLOW ) /*!< value too large */ \
139
+ X (HG_MSGSIZE ) /*!< message size too long */ \
140
+ X (HG_PROTONOSUPPORT ) /*!< protocol not supported */ \
141
+ X (HG_OPNOTSUPPORTED ) /*!< operation not supported on endpoint */ \
142
+ X (HG_ADDRINUSE ) /*!< address already in use */ \
143
+ X (HG_ADDRNOTAVAIL ) /*!< cannot assign requested address */ \
144
+ X (HG_HOSTUNREACH ) /*!< cannot reach host during operation */ \
145
+ X (HG_TIMEOUT ) /*!< operation reached timeout */ \
146
+ X (HG_CANCELED ) /*!< operation canceled */ \
147
+ X (HG_IO_ERROR ) /*!< I/O error */ \
148
+ X (HG_CHECKSUM_ERROR ) /*!< checksum error */ \
149
+ X (HG_NA_ERROR ) /*!< generic NA error */ \
150
+ X (HG_OTHER_ERROR ) /*!< generic HG error */ \
151
+ X (HG_RETURN_MAX )
152
+
153
+ #define X (a ) a ,
160
154
typedef enum hg_return { HG_RETURN_VALUES } hg_return_t ;
161
155
#undef X
162
156
0 commit comments