Skip to content

Commit

Permalink
Merge pull request open-mpi#3044 from hjelmn/v2.0.x_osc_rdma_lock
Browse files Browse the repository at this point in the history
osc/rdma: make locking code more robust
  • Loading branch information
jsquyres authored Mar 6, 2017
2 parents a76376d + 5fcfe82 commit 06ce91f
Show file tree
Hide file tree
Showing 2 changed files with 163 additions and 141 deletions.
10 changes: 9 additions & 1 deletion ompi/mca/osc/rdma/osc_rdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights
* Copyright (c) 2007-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
Expand Down Expand Up @@ -504,4 +504,12 @@ static inline void ompi_osc_rdma_aggregation_return (ompi_osc_rdma_aggregation_t
opal_free_list_return(&mca_osc_rdma_component.aggregate, (opal_free_list_item_t *) aggregation);
}


__opal_attribute_always_inline__
static inline bool ompi_osc_rdma_oor (int rc)
{
/* check for OPAL_SUCCESS first to short-circuit the statement in the common case */
return (OPAL_SUCCESS != rc && (OPAL_ERR_OUT_OF_RESOURCE == rc || OPAL_ERR_TEMP_OUT_OF_RESOURCE == rc));
}

#endif /* OMPI_OSC_RDMA_H */
Loading

0 comments on commit 06ce91f

Please sign in to comment.