{\r
p_mad_element_list = p_last_mad_element = NULL;\r
\r
- cl_spinlock_acquire( &p_pool_key->obj.h_al->obj.lock );\r
+ cl_spinlock_acquire( &p_pool_key->obj.h_al->mad_lock );\r
for( p_list_item = cl_qlist_head( &p_pool_key->obj.h_al->mad_list );\r
p_list_item != cl_qlist_end( &p_pool_key->obj.h_al->mad_list );\r
p_list_item = p_next_item )\r
p_last_mad_element = &p_mad->element;\r
p_last_mad_element->p_next = NULL;\r
}\r
- cl_spinlock_release( &p_pool_key->obj.h_al->obj.lock );\r
+ cl_spinlock_release( &p_pool_key->obj.h_al->mad_lock );\r
\r
/* Return any outstanding MADs to the pool. */\r
if( p_mad_element_list )\r
}\r
\r
\r
-void\r
-proxy_put_mad(\r
- IN const ib_mad_element_t* p_mad_element )\r
-{\r
- al_mad_element_t* p_mad;\r
-\r
- CL_ASSERT( p_mad_element );\r
- CL_ASSERT( !p_mad_element->p_next );\r
-\r
- p_mad = PARENT_STRUCT( p_mad_element, al_mad_element_t, element );\r
-\r
- /* Deallocate any buffers allocated for the user. */\r
- if( p_mad->p_al_mad_buf )\r
- {\r
- cl_free( p_mad->p_al_mad_buf );\r
- p_mad->p_al_mad_buf = NULL;\r
- }\r
-\r
- /* See if the MAD has already been returned to the MAD pool. */\r
- CL_ASSERT( p_mad->h_al );\r
-\r
- /* Remove the MAD element from the owning AL instance. */\r
- cl_qlist_remove_item( &p_mad->h_al->mad_list, &p_mad->al_item );\r
- deref_al_obj( &p_mad->h_al->obj );\r
- p_mad->h_al = NULL;\r
-\r
- /* Return the MAD element to the pool. */\r
- __put_mad_element( p_mad );\r
-}\r
-\r
-\r
\r
/*\r
* Resize the data buffer associated with a MAD element.\r
*/\r
if( !proxy_context_ref( p_context ) )\r
{\r
- proxy_put_mad( p_mad_element );\r
+ ib_put_mad( p_mad_element );\r
AL_EXIT( AL_DBG_MAD );\r
return;\r
}\r
{\r
al_hdl_free( p_context->h_al, hdl );\r
proxy_mad_recv_cb_err:\r
- proxy_put_mad( p_mad_element );\r
+ ib_put_mad( p_mad_element );\r
}\r
cl_spinlock_release( &p_context->h_al->obj.lock );\r
\r