tinyOS  v1.00
单向链表

tinyOS所用的单向链表数据结构 More...

Data Structures

struct  _tSnode
 
struct  _tSlist
 

Typedefs

typedef struct _tSnode tSnode
 
typedef struct _tSlist tSlist
 

Functions

void tSnodeInit (tSnode *snode)
 
void tSlistInit (tSlist *slist)
 
uint32_t tSlistCount (tSlist *slist)
 
tSnodetSlistFirst (tSlist *slist)
 
tSnodetSlistLast (tSlist *slist)
 
void tSListAddFirst (tSlist *slist, tSnode *snode)
 
void tSListAddLast (tSlist *slist, tSnode *snode)
 
tSnodetSListRemoveFirst (tSlist *slist)
 

Detailed Description

tinyOS所用的单向链表数据结构

Author
01课堂 lishutong
Date
2017-06-01
Version
1.0

Typedef Documentation

◆ tSlist

typedef struct _tSlist tSlist

单向链表

◆ tSnode

typedef struct _tSnode tSnode

单向链表结点

Function Documentation

◆ tSListAddFirst()

void tSListAddFirst ( tSlist slist,
tSnode snode 
)

将结点添加到链表表头

Parameters
slist操作的链表
snode待插入的结点

Definition at line 66 of file tSlist.c.

◆ tSListAddLast()

void tSListAddLast ( tSlist slist,
tSnode snode 
)

将结点插入到链表尾部

Parameters
slist操作的链表
snode待插入的结点

Definition at line 83 of file tSlist.c.

Here is the caller graph for this function:

◆ tSlistCount()

uint32_t tSlistCount ( tSlist slist)

获取单链表结点数量

Parameters
slist查询的单链表
Returns
结点数量

Definition at line 39 of file tSlist.c.

Here is the caller graph for this function:

◆ tSlistFirst()

tSnode * tSlistFirst ( tSlist slist)

获取单链表的第一个结点

Parameters
slist查询的单链表
Returns
第一个结点,如果没有,返回0

Definition at line 48 of file tSlist.c.

◆ tSlistInit()

void tSlistInit ( tSlist slist)

初始化单链表

Parameters
slist单链表

Definition at line 28 of file tSlist.c.

Here is the caller graph for this function:

◆ tSlistLast()

tSnode * tSlistLast ( tSlist slist)

获取单链表的最后一个结点

Parameters
slist查询的单链表
Returns
最后一个结点,如果没有,返回0

Definition at line 57 of file tSlist.c.

◆ tSListRemoveFirst()

tSnode * tSListRemoveFirst ( tSlist slist)

移除链表的首个结点

Parameters
slist操作的链表
Returns
移除的结点,如果没有,返回0

Definition at line 101 of file tSlist.c.

Here is the caller graph for this function:

◆ tSnodeInit()

void tSnodeInit ( tSnode snode)

初始化单链表结点

Parameters
snode单链表结点

Definition at line 20 of file tSlist.c.

Here is the caller graph for this function: