Skip to content

Commit

Permalink
UCP/NBX: fixed external request free from CB
Browse files Browse the repository at this point in the history
- fixed tests hang
  • Loading branch information
Sergey committed Dec 10, 2020
1 parent 87e8f52 commit f7e6def
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ucp/core/ucp_request.inl
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@

#define ucp_request_complete(_req, _cb, _status, ...) \
{ \
uint32_t _external = (_req)->flags & UCP_REQUEST_FLAG_EXTERNAL; \
uint32_t _external = ((_req)->flags |= UCP_REQUEST_FLAG_COMPLETED) & \
UCP_REQUEST_FLAG_EXTERNAL; \
(_req)->status = (_status); \
if (ucs_likely((_req)->flags & UCP_REQUEST_FLAG_CALLBACK)) { \
(_req)->_cb((_req) + 1, (_status), ## __VA_ARGS__); \
} \
if (ucs_unlikely(!_external && \
((_req)->flags |= UCP_REQUEST_FLAG_COMPLETED) & \
UCP_REQUEST_FLAG_RELEASED)) { \
(_req)->flags & UCP_REQUEST_FLAG_RELEASED)) { \
ucp_request_put(_req); \
} \
}
Expand Down

0 comments on commit f7e6def

Please sign in to comment.