win-pvdrivers

annotate liblfds.6/src/single_dir_for_windows_kernel/freelist_get_and_set.c @ 1106:2d392ecdd366

Fix race is xenvbd causing 30 second freeze under high load
author James Harper <james.harper@bendigoit.com.au>
date Tue Nov 11 23:08:11 2014 +1100 (2014-11-11)
parents 6300617040e0
children
rev   line source
james@766 1 #include "freelist_internal.h"
james@766 2
james@766 3
james@766 4
james@766 5
james@766 6
james@766 7 /****************************************************************************/
james@766 8 void *freelist_get_user_data_from_element( struct freelist_element *fe, void **user_data )
james@766 9 {
james@766 10 assert( fe != NULL );
james@766 11 // TRD : user_data can be NULL
james@766 12
james@766 13 if( user_data != NULL )
james@766 14 *user_data = fe->user_data;
james@766 15
james@766 16 return( fe->user_data );
james@766 17 }
james@766 18
james@766 19
james@766 20
james@766 21
james@766 22
james@766 23 /****************************************************************************/
james@766 24 void freelist_set_user_data_in_element( struct freelist_element *fe, void *user_data )
james@766 25 {
james@766 26 assert( fe != NULL );
james@766 27 // TRD : user_data can be NULL
james@766 28
james@766 29 fe->user_data = user_data;
james@766 30
james@766 31 return;
james@766 32 }
james@766 33