r6.1.0:lfds610_slist_new_head

From liblfds.org
Jump to navigation Jump to search

Source Files

/liblfds610/src/lfds610_slist/lfds610_slist_new.c
/liblfds610/inc/liblfds610.h

Prototype

struct lfds610_slist_element *lfds610_slist_new_head( struct lfds610_slist_state *ss, void *user_data );

Parameters

struct lfds610_slist_state *ss

An slist state as allocated by lfds610_slist_new.

void *user_data

A void pointer of user data which will be placed into the list in the new head element.

Return Value

Returns a pointer to the new slist element. If element creation failed, which can only happen because of memory allocation failure, the return value is NULL.

Notes

This function creates a new slist element holding user_data and links it into the slist as the head element.

See Also