1
0
Fork 0
forked from len0rd/rockbox

Simplify mpegplayer a bit and use array-based lists rather than linked lists for stream management. Move a couple useful functions to handle pointer arrays from kernel.c into general.c; mpeglayer now makes use of them.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26101 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2010-05-17 12:34:05 +00:00
parent 9fde12676b
commit fcf36dd4f9
15 changed files with 199 additions and 313 deletions

View file

@ -202,4 +202,30 @@ uint32_t muldiv_uint32(uint32_t multiplicand,
uint32_t multiplier,
uint32_t divisor);
/** Lists **/
/* Does the list have any members? */
bool list_is_empty(void **list);
/* Is the item inserted into a particular list? */
bool list_is_member(void **list, void *item);
/* Removes an item from a list - returns true if item was found
* and thus removed. */
bool list_remove_item(void **list, void *item);
/* Adds a list item, insert last, if not already present. */
void list_add_item(void **list, void *item);
/* Clears the entire list. */
void list_clear_all(void **list);
/* Enumerate all items in the array. */
typedef bool (*list_enum_callback_t)(void *item, intptr_t data);
void list_enum_items(void **list,
list_enum_callback_t callback,
intptr_t data);
#endif /* MPEG_MISC_H */