Difference between pages "r6:Function:slist delete" and "r6:Function:slist delete all elements"

From liblfds.org
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
m (1 revision imported)
 
Line 4: Line 4:


==Prototype==
==Prototype==
  void slist_delete( struct slist_state *ss );
  void slist_delete_all_elements( struct slist_state *ss );


==Parameters==
==Parameters==
Line 14: Line 14:


==Notes==
==Notes==
This function deletes the slist.  The ''user_data_delete_function'' function provided to ''slist_new'' is called with the user data from each element.
This function deletes every element in the slist.  This is not a logical delete - the elements are actually freed and the ''user_data_delete_function'' passed to ''slist_new'' is called with each user data void pointer immediately before the element is freed.  This function is not thread-safe; it can only be issued by one thread and there can be no other in-progress slist operations when it is called.


==See Also==
==See Also==
* [[r6:API:SList|SList]]
* [[r6:API:SList|SList]]
* [[r6:Function:slist_new|slist_new]]
* [[r6:Function:slist_delete|slist_delete]]

Latest revision as of 14:07, 4 January 2015

Source Files

/src/slist/slist_delete.c
/inc/liblfds.h

Prototype

void slist_delete_all_elements( struct slist_state *ss );

Parameters

struct slist_state *ss

An slist state as allocated by slist_new.

Return Value

No return value.

Notes

This function deletes every element in the slist. This is not a logical delete - the elements are actually freed and the user_data_delete_function passed to slist_new is called with each user data void pointer immediately before the element is freed. This function is not thread-safe; it can only be issued by one thread and there can be no other in-progress slist operations when it is called.

See Also