win-pvdrivers

view 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
line source
1 #include "freelist_internal.h"
7 /****************************************************************************/
8 void freelist_delete( struct freelist_state *fs, void (*user_data_delete_function)(void *user_data, void *user_state), void *user_state )
9 {
10 struct freelist_element
11 *fe;
13 void
14 *user_data;
16 assert( fs != NULL );
17 // TRD : user_data_delete_function can be NULL
18 // TRD : user_state can be NULL
20 while( freelist_pop(fs, &fe) )
21 {
22 if( user_data_delete_function != NULL )
23 {
24 freelist_get_user_data_from_element( fe, &user_data );
25 user_data_delete_function( user_data, user_state );
26 }
28 abstraction_aligned_free( fe );
29 }
31 abstraction_aligned_free( fs );
33 return;
34 }