|
1 | 1 | /* |
2 | | - * Copyright (c) 2012-2013 Cisco Systems, Inc. All rights reserved. |
| 2 | + * Copyright (c) 2012-2016 Cisco Systems, Inc. All rights reserved. |
3 | 3 | * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved |
4 | 4 | * Copyright (c) 2015 Intel, Inc. All rights reserved. |
5 | 5 | * $COPYRIGHT$ |
@@ -146,6 +146,11 @@ OBJ_CLASS_DECLARATION(opal_hotel_t); |
146 | 146 | * will be set - occupants will remain checked into the hotel until |
147 | 147 | * explicitly checked out. |
148 | 148 | * |
| 149 | + * Also note: the eviction_callback_fn should absolutely not call any |
| 150 | + * of the hotel checkout functions. Specifically: the occupant has |
| 151 | + * already been ("forcibly") checked out *before* the |
| 152 | + * eviction_callback_fn is invoked. |
| 153 | + * |
149 | 154 | * @return OPAL_SUCCESS if all initializations were succesful. Otherwise, |
150 | 155 | * the error indicate what went wrong in the function. |
151 | 156 | */ |
@@ -244,6 +249,9 @@ static inline void opal_hotel_checkout(opal_hotel_t *hotel, int room_num) |
244 | 249 | /* If there's an occupant in the room, check them out */ |
245 | 250 | room = &(hotel->rooms[room_num]); |
246 | 251 | if (OPAL_LIKELY(NULL != room->occupant)) { |
| 252 | + /* Do not change this logic without also changing the same |
| 253 | + logic in opal_hotel_checkout_and_return_occupant() and |
| 254 | + opal_hotel.c:local_eviction_callback(). */ |
247 | 255 | room->occupant = NULL; |
248 | 256 | if (NULL != hotel->evbase) { |
249 | 257 | opal_event_del(&(room->eviction_timer_event)); |
@@ -280,6 +288,9 @@ static inline void opal_hotel_checkout_and_return_occupant(opal_hotel_t *hotel, |
280 | 288 | room = &(hotel->rooms[room_num]); |
281 | 289 | if (OPAL_LIKELY(NULL != room->occupant)) { |
282 | 290 | opal_output (10, "checking out occupant %p from room num %d", room->occupant, room_num); |
| 291 | + /* Do not change this logic without also changing the same |
| 292 | + logic in opal_hotel_checkout() and |
| 293 | + opal_hotel.c:local_eviction_callback(). */ |
283 | 294 | *occupant = room->occupant; |
284 | 295 | room->occupant = NULL; |
285 | 296 | if (NULL != hotel->evbase) { |
|
0 commit comments