#include <stddef.h>
#include <cyg/infra/cyg_type.h>
Go to the source code of this file.
|
#define | LIST_HEAD_INIT(name) { &(name), &(name) } |
|
#define | LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name) |
|
#define | INIT_LIST_HEAD(_list_) |
|
#define | list_entry(_list_, _type_, _member_) ((_type_ *)((char *)(_list_)-(char *)(offsetof(_type_,_member_)))) |
|
#define | list_for_each(_ent_, _list_) |
|
#define | list_for_each_entry(_list_, _head_, _item_) |
|
◆ INIT_LIST_HEAD
#define INIT_LIST_HEAD |
( |
|
_list_ | ) |
|
Value:CYG_MACRO_START \
(_list_)->next = (_list_)->prev = (_list_); \
CYG_MACRO_END
◆ list_for_each
#define list_for_each |
( |
|
_ent_, |
|
|
|
_list_ |
|
) |
| |
Value:for ( (_ent_) = (_list_)->next; \
(_ent_) != (_list_); \
(_ent_) = (_ent_)->next )
◆ list_for_each_entry
#define list_for_each_entry |
( |
|
_list_, |
|
|
|
_head_, |
|
|
|
_item_ |
|
) |
| |
Value:for ((_list_) = list_entry((_head_)->next, typeof(*_list_), _item_); \
&((_list_)->_item_) != (_head_); \
(_list_) = list_entry((_list_)->_item_.next, typeof(*_list_), _item_))