tuya hash list module
更多...
#include "tuya_cloud_types.h"
浏览源代码.
|
|
#define | HLIST_ENTRY(ptr, type, member) CNTR_OF(ptr,type,member) |
| | convert hash list node to object
|
| |
| #define | HLIST_FOR_EACH(pos, head) |
| | traverse the hash list node 更多...
|
| |
| #define | HLIST_FOR_EACH_ENTRY(tpos, type, pos, head, member) |
| | traverse the member of the hash list 更多...
|
| |
| #define | HLIST_FOR_EACH_ENTRY_CURR(tpos, type, pos, curr, member) |
| | traverse the member of the hash list from a special member 更多...
|
| |
| #define | HLIST_FOR_EACH_ENTRY_SAFE(tpos, type, pos, n, head, member) |
| | traverse the member of the hash list in safe mode, can change the hash list when traverse 更多...
|
| |
| #define | HLIST_FOR_EACH_SAFE(pos, n, head) |
| | traverse the hash list node in safe mode, can change the hash list when traverse 更多...
|
| |
|
#define | HLIST_HEAD(name) HLIST_HEAD name = {.first = NULL} |
| | hash list head define and initialization
|
| |
|
#define | HLIST_HEAD_INIT { .first = NULL} |
| | hash list head initialization
|
| |
|
#define | INIT_HLIST_HEAD(ptr) ((ptr->first)=NULL) |
| | hash list head pointer initialization
|
| |
|
|
typedef struct hlist_head | HLIST_HEAD |
| | hash list head
|
| |
|
typedef struct hlist_node | HLIST_NODE |
| | hash list node
|
| |
tuya hash list module
- 版本
- 1.0
- 日期
- 2019-10-30
- 版权所有
- Copyright 2021-2025 Tuya Inc. All Rights Reserved.
◆ HLIST_FOR_EACH
| #define HLIST_FOR_EACH |
( |
|
pos, |
|
|
|
head |
|
) |
| |
值: for (pos = (head)->first; pos ; \
pos = pos->next)
traverse the hash list node
◆ HLIST_FOR_EACH_ENTRY
| #define HLIST_FOR_EACH_ENTRY |
( |
|
tpos, |
|
|
|
type, |
|
|
|
pos, |
|
|
|
head, |
|
|
|
member |
|
) |
| |
值: for (pos = (head)->first; \
pos = pos->next)
#define HLIST_ENTRY(ptr, type, member)
convert hash list node to object
Definition: tuya_hlist.h:57
traverse the member of the hash list
◆ HLIST_FOR_EACH_ENTRY_CURR
| #define HLIST_FOR_EACH_ENTRY_CURR |
( |
|
tpos, |
|
|
|
type, |
|
|
|
pos, |
|
|
|
curr, |
|
|
|
member |
|
) |
| |
值: for (pos = (curr)->next; \
pos = pos->next)
traverse the member of the hash list from a special member
◆ HLIST_FOR_EACH_ENTRY_SAFE
| #define HLIST_FOR_EACH_ENTRY_SAFE |
( |
|
tpos, |
|
|
|
type, |
|
|
|
pos, |
|
|
|
n, |
|
|
|
head, |
|
|
|
member |
|
) |
| |
值: for (pos = (head)->first; \
pos && (n = pos->next, 1) && \
pos = n)
traverse the member of the hash list in safe mode, can change the hash list when traverse
◆ HLIST_FOR_EACH_SAFE
| #define HLIST_FOR_EACH_SAFE |
( |
|
pos, |
|
|
|
n, |
|
|
|
head |
|
) |
| |
值: for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
pos = n)
traverse the hash list node in safe mode, can change the hash list when traverse