mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-20 06:59:53 -05:00
implement proper refcounting in polyplib
split polyplib to multiple modules add some prelimenary documentation add doxygen support git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@123 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
1c2ec47cf1
commit
22cb23eedb
45 changed files with 2853 additions and 12800 deletions
39
polyp/llist.h
Normal file
39
polyp/llist.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef foollistfoo
|
||||
#define foollistfoo
|
||||
|
||||
#define PA_LLIST_HEAD(t,name) t *name
|
||||
|
||||
#define PA_LLIST_FIELDS(t) t *next, *prev;
|
||||
|
||||
#define PA_LLIST_HEAD_INIT(t,item) do { (item) = NULL; } while(0)
|
||||
|
||||
#define PA_LLIST_INIT(t,item) do { \
|
||||
t *_item = (item); \
|
||||
assert(_item); \
|
||||
_item->prev = _item->next = NULL; \
|
||||
} while(0)
|
||||
|
||||
#define PA_LLIST_PREPEND(t,head,item) do { \
|
||||
t **_head = &(head), *_item = (item); \
|
||||
assert(_item); \
|
||||
if ((_item->next = *_head)) \
|
||||
_item->next->prev = _item; \
|
||||
_item->prev = NULL; \
|
||||
*_head = _item; \
|
||||
} while (0)
|
||||
|
||||
#define PA_LLIST_REMOVE(t,head,item) do { \
|
||||
t **_head = &(head), *_item = (item); \
|
||||
assert(_item); \
|
||||
if (_item->next) \
|
||||
_item->next->prev = _item->prev; \
|
||||
if (_item->prev) \
|
||||
_item->prev->next = _item->next; \
|
||||
else {\
|
||||
assert(*_head == _item); \
|
||||
*_head = _item->next; \
|
||||
} \
|
||||
_item->next = _item->prev = NULL; \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue