win-pvdrivers

view liblfds.6/src/single_dir_for_windows_kernel/stack_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 "stack_internal.h"
7 /****************************************************************************/
8 void stack_delete( struct stack_state *ss, void (*user_data_delete_function)(void *user_data, void *user_state), void *user_state )
9 {
10 void
11 *user_data;
13 assert( ss != NULL );
14 // TRD : user_data_delete_function can be NULL
15 // TRD : user_state can be NULL
17 while( stack_pop(ss, &user_data) )
18 if( user_data_delete_function != NULL )
19 user_data_delete_function( user_data, user_state );
21 freelist_delete( ss->fs, stack_internal_freelist_delete_function, NULL );
23 abstraction_aligned_free( ss );
25 return;
26 }
32 /****************************************************************************/
33 void stack_clear( struct stack_state *ss, void (*user_data_clear_function)(void *user_data, void *user_state), void *user_state )
34 {
35 void
36 *user_data;
38 assert( ss != NULL );
39 // TRD : user_data_clear_function can be NULL
40 // TRD : user_state can be NULL
42 while( stack_pop(ss, &user_data) )
43 if( user_data_clear_function != NULL )
44 user_data_clear_function( user_data, user_state );
46 return;
47 }
53 /****************************************************************************/
54 #pragma warning( disable : 4100 )
56 void stack_internal_freelist_delete_function( void *user_data, void *user_state )
57 {
58 assert( user_data != NULL );
59 assert( user_state == NULL );
61 abstraction_aligned_free( user_data );
63 return;
64 }
66 #pragma warning( default : 4100 )