TuyaOS
结构体 | 宏定义 | 类型定义
tuya_hlist.h 文件参考

tuya hash list module 更多...

#include "tuya_cloud_types.h"
tuya_hlist.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  hlist_head
 hash list head 更多...
 

宏定义

#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

宏定义说明

◆ 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 && (tpos = HLIST_ENTRY(pos, type, member), 1); \
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 && (tpos = HLIST_ENTRY(pos, type, member), 1); \
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) && \
(tpos = HLIST_ENTRY(pos, type, member), 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