2 Star 3 Fork 5

杰杰/Linux_Gateway-ioT

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
link_list.c 704 Bytes
Copy Edit Raw Blame History
HoweiXue authored 2016-05-24 19:56 +08:00 . Linux物联网网关(多线程实现)
#include "link_list.h"
#include "data_global.h"
linklist linkHead, linkTail;
linklist CreateEmptyLinklist ()
{
linklist h;
h = (linklist)malloc (sizeof (linknode));
linkTail = h;
h->next = NULL;
return h;
}
int EmptyLinklist (linklist h)
{
return NULL == h->next;
}
linklist GetLinknode (linklist h)
{
if (1 == EmptyLinklist (h))
{
return NULL;
}
linklist p = h->next;
h->next = p->next;
if (p->next == NULL)
linkTail = h;
return p;
}
int InsertLinknode (link_datatype x)
{
linklist q = (linklist)malloc (sizeof (linknode));
if (NULL == q)
{
printf ("InsertLinknode Error\n");
return -1;
}
linkTail->next = q;
linkTail = q;
q->data = x;
q->next = NULL;
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jiejietop/Linux_Gateway-ioT.git
git@gitee.com:jiejietop/Linux_Gateway-ioT.git
jiejietop
Linux_Gateway-ioT
Linux_Gateway-ioT
master

Search