win-pvdrivers

annotate liblfds.6/src/single_dir_for_windows_kernel/freelist_delete.c @ 1025:aa2e51f67f7c

Fix hibernate under Win8. Change debugprints.
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 19 15:14:53 2013 +1100 (2013-02-19)
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_delete( struct freelist_state *fs, void (*user_data_delete_function)(void *user_data, void *user_state), void *user_state )
james@766 9 {
james@766 10 struct freelist_element
james@766 11 *fe;
james@766 12
james@766 13 void
james@766 14 *user_data;
james@766 15
james@766 16 assert( fs != NULL );
james@766 17 // TRD : user_data_delete_function can be NULL
james@766 18 // TRD : user_state can be NULL
james@766 19
james@766 20 while( freelist_pop(fs, &fe) )
james@766 21 {
james@766 22 if( user_data_delete_function != NULL )
james@766 23 {
james@766 24 freelist_get_user_data_from_element( fe, &user_data );
james@766 25 user_data_delete_function( user_data, user_state );
james@766 26 }
james@766 27
james@766 28 abstraction_aligned_free( fe );
james@766 29 }
james@766 30
james@766 31 abstraction_aligned_free( fs );
james@766 32
james@766 33 return;
james@766 34 }
james@766 35