UCX
1.18
Unified Communication X
status.h
1
9
#ifndef UCS_TYPES_STATUS_H_
10
#define UCS_TYPES_STATUS_H_
11
12
#include <ucs/sys/compiler_def.h>
13
14
BEGIN_C_DECLS
15
45
typedef
enum
{
46
/* Operation completed successfully */
47
UCS_OK
= 0,
48
49
/* Operation is queued and still in progress */
50
UCS_INPROGRESS
= 1,
51
52
/* Failure codes */
53
UCS_ERR_NO_MESSAGE
= -1,
54
UCS_ERR_NO_RESOURCE
= -2,
55
UCS_ERR_IO_ERROR
= -3,
56
UCS_ERR_NO_MEMORY
= -4,
57
UCS_ERR_INVALID_PARAM
= -5,
58
UCS_ERR_UNREACHABLE
= -6,
59
UCS_ERR_INVALID_ADDR
= -7,
60
UCS_ERR_NOT_IMPLEMENTED
= -8,
61
UCS_ERR_MESSAGE_TRUNCATED
= -9,
62
UCS_ERR_NO_PROGRESS
= -10,
63
UCS_ERR_BUFFER_TOO_SMALL
= -11,
64
UCS_ERR_NO_ELEM
= -12,
65
UCS_ERR_SOME_CONNECTS_FAILED
= -13,
66
UCS_ERR_NO_DEVICE
= -14,
67
UCS_ERR_BUSY
= -15,
68
UCS_ERR_CANCELED
= -16,
69
UCS_ERR_SHMEM_SEGMENT
= -17,
70
UCS_ERR_ALREADY_EXISTS
= -18,
71
UCS_ERR_OUT_OF_RANGE
= -19,
72
UCS_ERR_TIMED_OUT
= -20,
73
UCS_ERR_EXCEEDS_LIMIT
= -21,
74
UCS_ERR_UNSUPPORTED
= -22,
75
UCS_ERR_REJECTED
= -23,
76
UCS_ERR_NOT_CONNECTED
= -24,
77
UCS_ERR_CONNECTION_RESET
= -25,
78
79
UCS_ERR_FIRST_LINK_FAILURE
= -40,
80
UCS_ERR_LAST_LINK_FAILURE
= -59,
81
UCS_ERR_FIRST_ENDPOINT_FAILURE
= -60,
82
UCS_ERR_ENDPOINT_TIMEOUT
= -80,
83
UCS_ERR_LAST_ENDPOINT_FAILURE
= -89,
84
85
UCS_ERR_LAST
= -100
86
} UCS_S_PACKED
ucs_status_t
;
87
88
89
#define UCS_IS_LINK_ERROR(_code) \
90
(((_code) <= UCS_ERR_FIRST_LINK_FAILURE) && \
91
((_code) >= UCS_ERR_LAST_LINK_FAILURE))
92
93
#define UCS_IS_ENDPOINT_ERROR(_code) \
94
(((_code) <= UCS_ERR_FIRST_ENDPOINT_FAILURE) && \
95
((_code) >= UCS_ERR_LAST_ENDPOINT_FAILURE))
96
106
typedef
void
*
ucs_status_ptr_t
;
107
108
#define UCS_PTR_IS_ERR(_ptr) (((uintptr_t)(_ptr)) >= ((uintptr_t)UCS_ERR_LAST))
109
#define UCS_PTR_IS_PTR(_ptr) (((uintptr_t)(_ptr) - 1) < ((uintptr_t)UCS_ERR_LAST - 1))
110
#define UCS_PTR_RAW_STATUS(_ptr) ((ucs_status_t)(intptr_t)(_ptr))
111
#define UCS_PTR_STATUS(_ptr) (UCS_PTR_IS_PTR(_ptr) ? UCS_INPROGRESS : UCS_PTR_RAW_STATUS(_ptr))
112
#define UCS_STATUS_PTR(_status) ((void*)(intptr_t)(_status))
113
#define UCS_STATUS_IS_ERR(_status) ((_status) < 0)
114
115
121
const
char
*ucs_status_string(
ucs_status_t
status);
122
123
END_C_DECLS
124
125
#endif
UCS_ERR_UNSUPPORTED
Definition:
status.h:74
UCS_ERR_ENDPOINT_TIMEOUT
Definition:
status.h:82
UCS_ERR_EXCEEDS_LIMIT
Definition:
status.h:73
UCS_ERR_NO_PROGRESS
Definition:
status.h:62
UCS_ERR_REJECTED
Definition:
status.h:75
UCS_ERR_SHMEM_SEGMENT
Definition:
status.h:69
UCS_ERR_BUSY
Definition:
status.h:67
UCS_ERR_CONNECTION_RESET
Definition:
status.h:77
UCS_ERR_BUFFER_TOO_SMALL
Definition:
status.h:63
UCS_ERR_LAST_ENDPOINT_FAILURE
Definition:
status.h:83
UCS_ERR_SOME_CONNECTS_FAILED
Definition:
status.h:65
UCS_ERR_NOT_IMPLEMENTED
Definition:
status.h:60
UCS_ERR_INVALID_PARAM
Definition:
status.h:57
UCS_ERR_FIRST_LINK_FAILURE
Definition:
status.h:79
UCS_ERR_IO_ERROR
Definition:
status.h:55
UCS_ERR_NO_MEMORY
Definition:
status.h:56
ucs_status_t
ucs_status_t
Status codes.
Definition:
status.h:45
UCS_ERR_TIMED_OUT
Definition:
status.h:72
UCS_ERR_NO_RESOURCE
Definition:
status.h:54
UCS_ERR_LAST
Definition:
status.h:85
UCS_ERR_NOT_CONNECTED
Definition:
status.h:76
UCS_ERR_LAST_LINK_FAILURE
Definition:
status.h:80
UCS_ERR_UNREACHABLE
Definition:
status.h:58
UCS_OK
Definition:
status.h:47
UCS_ERR_NO_MESSAGE
Definition:
status.h:53
UCS_ERR_INVALID_ADDR
Definition:
status.h:59
ucs_status_ptr_t
void * ucs_status_ptr_t
Status pointer.
Definition:
status.h:106
UCS_ERR_CANCELED
Definition:
status.h:68
UCS_ERR_MESSAGE_TRUNCATED
Definition:
status.h:61
UCS_ERR_NO_DEVICE
Definition:
status.h:66
UCS_INPROGRESS
Definition:
status.h:50
UCS_ERR_ALREADY_EXISTS
Definition:
status.h:70
UCS_ERR_NO_ELEM
Definition:
status.h:64
UCS_ERR_FIRST_ENDPOINT_FAILURE
Definition:
status.h:81
UCS_ERR_OUT_OF_RANGE
Definition:
status.h:71
src
ucs
type
status.h
Generated on Tue Jan 21 2025 10:27:38 for UCX by
1.8.14