Skip to content

Commit 06ce91f

Browse files
authored
Merge pull request #3044 from hjelmn/v2.0.x_osc_rdma_lock
osc/rdma: make locking code more robust
2 parents a76376d + 5fcfe82 commit 06ce91f

File tree

2 files changed

+163
-141
lines changed

2 files changed

+163
-141
lines changed

ompi/mca/osc/rdma/osc_rdma.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* University of Stuttgart. All rights reserved.
99
* Copyright (c) 2004-2005 The Regents of the University of California.
1010
* All rights reserved.
11-
* Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights
11+
* Copyright (c) 2007-2017 Los Alamos National Security, LLC. All rights
1212
* reserved.
1313
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
@@ -504,4 +504,12 @@ static inline void ompi_osc_rdma_aggregation_return (ompi_osc_rdma_aggregation_t
504504
opal_free_list_return(&mca_osc_rdma_component.aggregate, (opal_free_list_item_t *) aggregation);
505505
}
506506

507+
508+
__opal_attribute_always_inline__
509+
static inline bool ompi_osc_rdma_oor (int rc)
510+
{
511+
/* check for OPAL_SUCCESS first to short-circuit the statement in the common case */
512+
return (OPAL_SUCCESS != rc && (OPAL_ERR_OUT_OF_RESOURCE == rc || OPAL_ERR_TEMP_OUT_OF_RESOURCE == rc));
513+
}
514+
507515
#endif /* OMPI_OSC_RDMA_H */

0 commit comments

Comments
 (0)