亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pbuf.c

?? 君正早期ucos系統(只有早期的才不沒有打包成庫),MPLAYER,文件系統,圖片解碼,瀏覽,電子書,錄音,想學ucos,識貨的人就下吧 russblock fmradio explore set
?? C
?? 第 1 頁 / 共 3 頁
字號:
  /* pbuf given? */  if (p != NULL) {    SYS_ARCH_PROTECT(old_level);    ++(p->ref);    SYS_ARCH_UNPROTECT(old_level);  }}/** * Concatenate two pbufs (each may be a pbuf chain) and take over * the caller's reference of the tail pbuf. *  * @note The caller MAY NOT reference the tail pbuf afterwards. * Use pbuf_chain() for that purpose. *  * @see pbuf_chain() */voidpbuf_cat(struct pbuf *h, struct pbuf *t){  struct pbuf *p;  LWIP_ASSERT("h != NULL (programmer violates API)", h != NULL);  LWIP_ASSERT("t != NULL (programmer violates API)", t != NULL);  if ((h == NULL) || (t == NULL)) return;  /* proceed to last pbuf of chain */  for (p = h; p->next != NULL; p = p->next) {    /* add total length of second chain to all totals of first chain */    p->tot_len += t->tot_len;  }  /* { p is last pbuf of first h chain, p->next == NULL } */  LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);  LWIP_ASSERT("p->next == NULL", p->next == NULL);  /* add total length of second chain to last pbuf total of first chain */  p->tot_len += t->tot_len;  /* chain last pbuf of head (p) with first of tail (t) */  p->next = t;  /* p->next now references t, but the caller will drop its reference to t,   * so netto there is no change to the reference count of t.   */}/** * Chain two pbufs (or pbuf chains) together. *  * The caller MUST call pbuf_free(t) once it has stopped * using it. Use pbuf_cat() instead if you no longer use t. *  * @param h head pbuf (chain) * @param t tail pbuf (chain) * @note The pbufs MUST belong to the same packet. * @note MAY NOT be called on a packet queue. * * The ->tot_len fields of all pbufs of the head chain are adjusted. * The ->next field of the last pbuf of the head chain is adjusted. * The ->ref field of the first pbuf of the tail chain is adjusted. * */voidpbuf_chain(struct pbuf *h, struct pbuf *t){  pbuf_cat(h, t);  /* t is now referenced by h */  pbuf_ref(t);  LWIP_DEBUGF(PBUF_DEBUG | DBG_FRESH | 2, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));}/* For packet queueing. Note that queued packets MUST be dequeued first * using pbuf_dequeue() before calling other pbuf_() functions. */#if ARP_QUEUEING/** * Add a packet to the end of a queue. * * @param q pointer to first packet on the queue * @param n packet to be queued * * Both packets MUST be given, and must be different. */voidpbuf_queue(struct pbuf *p, struct pbuf *n){#if PBUF_DEBUG /* remember head of queue */  struct pbuf *q = p;#endif  /* programmer stupidity checks */  LWIP_ASSERT("p == NULL in pbuf_queue: this indicates a programmer error\n", p != NULL);  LWIP_ASSERT("n == NULL in pbuf_queue: this indicates a programmer error\n", n != NULL);  LWIP_ASSERT("p == n in pbuf_queue: this indicates a programmer error\n", p != n);  if ((p == NULL) || (n == NULL) || (p == n)){    LWIP_DEBUGF(PBUF_DEBUG | DBG_HALT | 3, ("pbuf_queue: programmer argument error\n"));    return;  }  /* iterate through all packets on queue */  while (p->next != NULL) {/* be very picky about pbuf chain correctness */#if PBUF_DEBUG    /* iterate through all pbufs in packet */    while (p->tot_len != p->len) {      /* make sure invariant condition holds */      LWIP_ASSERT("p->len < p->tot_len", p->len < p->tot_len);      /* make sure each packet is complete */      LWIP_ASSERT("p->next != NULL", p->next != NULL);      p = p->next;      /* { p->tot_len == p->len => p is last pbuf of a packet } */    }    /* { p is last pbuf of a packet } */    /* proceed to next packet on queue */#endif    /* proceed to next pbuf */    if (p->next != NULL) p = p->next;  }  /* { p->tot_len == p->len and p->next == NULL } ==>   * { p is last pbuf of last packet on queue } */  /* chain last pbuf of queue with n */  p->next = n;  /* n is now referenced to by the (packet p in the) queue */  pbuf_ref(n);#if PBUF_DEBUG  LWIP_DEBUGF(PBUF_DEBUG | DBG_FRESH | 2,    ("pbuf_queue: newly queued packet %p sits after packet %p in queue %p\n",    (void *)n, (void *)p, (void *)q));#endif}/** * Remove a packet from the head of a queue. * * The caller MUST reference the remainder of the queue (as returned). The * caller MUST NOT call pbuf_ref() as it implicitly takes over the reference * from p. *  * @param p pointer to first packet on the queue which will be dequeued. * @return first packet on the remaining queue (NULL if no further packets). * */struct pbuf *pbuf_dequeue(struct pbuf *p){  struct pbuf *q;  LWIP_ASSERT("p != NULL", p != NULL);  /* iterate through all pbufs in packet p */  while (p->tot_len != p->len) {    /* make sure invariant condition holds */    LWIP_ASSERT("p->len < p->tot_len", p->len < p->tot_len);    /* make sure each packet is complete */    LWIP_ASSERT("p->next != NULL", p->next != NULL);    p = p->next;  }  /* { p->tot_len == p->len } => p is the last pbuf of the first packet */  /* remember next packet on queue in q */  q = p->next;  /* dequeue packet p from queue */  p->next = NULL;  /* any next packet on queue? */  if (q != NULL) {    /* although q is no longer referenced by p, it MUST be referenced by     * the caller, who is maintaining this packet queue. So, we do not call     * pbuf_free(q) here, resulting in an implicit pbuf_ref(q) for the caller. */    LWIP_DEBUGF(PBUF_DEBUG | DBG_FRESH | 2, ("pbuf_dequeue: first remaining packet on queue is %p\n", (void *)q));  } else {    LWIP_DEBUGF(PBUF_DEBUG | DBG_FRESH | 2, ("pbuf_dequeue: no further packets on queue\n"));  }  return q;}#endif/** * * Create PBUF_POOL (or PBUF_RAM) copies of PBUF_REF pbufs. * * Used to queue packets on behalf of the lwIP stack, such as * ARP based queueing. * * Go through a pbuf chain and replace any PBUF_REF buffers * with PBUF_POOL (or PBUF_RAM) pbufs, each taking a copy of * the referenced data. * * @note You MUST explicitly use p = pbuf_take(p); * The pbuf you give as argument, may have been replaced * by a (differently located) copy through pbuf_take()! * * @note Any replaced pbufs will be freed through pbuf_free(). * This may deallocate them if they become no longer referenced. * * @param p Head of pbuf chain to process * * @return Pointer to head of pbuf chain */struct pbuf *pbuf_take(struct pbuf *p){  struct pbuf *q , *prev, *head;  LWIP_ASSERT("pbuf_take: p != NULL\n", p != NULL);  LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 3, ("pbuf_take(%p)\n", (void*)p));  prev = NULL;  head = p;  /* iterate through pbuf chain */  do  {    /* pbuf is of type PBUF_REF? */    if (p->flags == PBUF_FLAG_REF) {      LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE, ("pbuf_take: encountered PBUF_REF %p\n", (void *)p));      /* allocate a pbuf (w/ payload) fully in RAM */      /* PBUF_POOL buffers are faster if we can use them */      if (p->len <= PBUF_POOL_BUFSIZE) {        q = pbuf_alloc(PBUF_RAW, p->len, PBUF_POOL);        if (q == NULL) {          LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_take: Could not allocate PBUF_POOL\n"));        }      } else {        /* no replacement pbuf yet */        q = NULL;        LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_take: PBUF_POOL too small to replace PBUF_REF\n"));      }      /* no (large enough) PBUF_POOL was available? retry with PBUF_RAM */      if (q == NULL) {        q = pbuf_alloc(PBUF_RAW, p->len, PBUF_RAM);        if (q == NULL) {          LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_take: Could not allocate PBUF_RAM\n"));        }      }      /* replacement pbuf could be allocated? */      if (q != NULL)      {        /* copy p to q */        /* copy successor */        q->next = p->next;        /* remove linkage from original pbuf */        p->next = NULL;        /* remove linkage to original pbuf */        if (prev != NULL) {          /* prev->next == p at this point */          LWIP_ASSERT("prev->next == p", prev->next == p);          /* break chain and insert new pbuf instead */          prev->next = q;        /* prev == NULL, so we replaced the head pbuf of the chain */        } else {          head = q;        }        /* copy pbuf payload */        memcpy(q->payload, p->payload, p->len);        q->tot_len = p->tot_len;        q->len = p->len;        /* in case p was the first pbuf, it is no longer refered to by         * our caller, as the caller MUST do p = pbuf_take(p);         * in case p was not the first pbuf, it is no longer refered to         * by prev. we can safely free the pbuf here.         * (note that we have set p->next to NULL already so that         * we will not free the rest of the chain by accident.)         */        pbuf_free(p);        /* do not copy ref, since someone else might be using the old buffer */        LWIP_DEBUGF(PBUF_DEBUG, ("pbuf_take: replaced PBUF_REF %p with %p\n", (void *)p, (void *)q));        p = q;      } else {        /* deallocate chain */        pbuf_free(head);        LWIP_DEBUGF(PBUF_DEBUG | 2, ("pbuf_take: failed to allocate replacement pbuf for %p\n", (void *)p));        return NULL;      }    /* p->flags != PBUF_FLAG_REF */    } else {      LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 1, ("pbuf_take: skipping pbuf not of type PBUF_REF\n"));    }    /* remember this pbuf */    prev = p;    /* proceed to next pbuf in original chain */    p = p->next;  } while (p);  LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 1, ("pbuf_take: end of chain reached.\n"));  return head;}/** * Dechains the first pbuf from its succeeding pbufs in the chain. * * Makes p->tot_len field equal to p->len. * @param p pbuf to dechain * @return remainder of the pbuf chain, or NULL if it was de-allocated. * @note May not be called on a packet queue. */struct pbuf *pbuf_dechain(struct pbuf *p){  struct pbuf *q;  u8_t tail_gone = 1;  /* tail */  q = p->next;  /* pbuf has successor in chain? */  if (q != NULL) {    /* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */    LWIP_ASSERT("p->tot_len == p->len + q->tot_len", q->tot_len == p->tot_len - p->len);    /* enforce invariant if assertion is disabled */    q->tot_len = p->tot_len - p->len;    /* decouple pbuf from remainder */    p->next = NULL;    /* total length of pbuf p is its own length only */    p->tot_len = p->len;    /* q is no longer referenced by p, free it */    LWIP_DEBUGF(PBUF_DEBUG | DBG_STATE, ("pbuf_dechain: unreferencing %p\n", (void *)q));    tail_gone = pbuf_free(q);    if (tail_gone > 0) {      LWIP_DEBUGF(PBUF_DEBUG | DBG_STATE,                  ("pbuf_dechain: deallocated %p (as it is no longer referenced)\n", (void *)q));    }    /* return remaining tail or NULL if deallocated */  }  /* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */  LWIP_ASSERT("p->tot_len == p->len", p->tot_len == p->len);  return (tail_gone > 0? NULL: q);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99久久99精品免视看婷婷| 欧美国产精品v| 另类调教123区 | 91久久精品网| 性做久久久久久免费观看| 欧美久久久久久蜜桃| 免费高清视频精品| 国产人伦精品一区二区| 97精品超碰一区二区三区| 亚洲一区二区三区精品在线| 日韩一级完整毛片| 国产mv日韩mv欧美| 亚洲图片一区二区| 欧美v国产在线一区二区三区| 国产精品91一区二区| 亚洲精品综合在线| 欧美大片在线观看一区二区| 不卡欧美aaaaa| 性感美女久久精品| 国产日韩亚洲欧美综合| 色婷婷一区二区三区四区| 免费一级片91| 亚洲欧美综合色| 678五月天丁香亚洲综合网| 国产成人综合视频| 亚洲成人av电影| 中文字幕第一页久久| 欧美精品第1页| 99久精品国产| 激情成人综合网| 亚洲国产视频网站| 国产精品美女久久久久久| 在线不卡一区二区| 99久久婷婷国产精品综合| 免费观看日韩av| 亚洲一区二区三区四区中文字幕 | 欧美色爱综合网| 国产乱妇无码大片在线观看| 亚洲一区二区美女| 欧美国产日产图区| 精品国产sm最大网站| 欧美午夜精品免费| jlzzjlzz亚洲日本少妇| 极品美女销魂一区二区三区免费| 亚洲男人都懂的| 国产精品欧美精品| 久久无码av三级| 日韩欧美亚洲国产另类| 欧美性感一区二区三区| 99久久精品费精品国产一区二区| 黑人精品欧美一区二区蜜桃 | 久久免费电影网| 国产激情一区二区三区| 成人avav影音| 在线免费观看日韩欧美| 亚洲电影第三页| 成人黄色在线网站| 欧美三片在线视频观看| 成人免费高清在线| 日韩欧美在线影院| 亚洲高清在线视频| 亚洲欧美成aⅴ人在线观看| 91在线高清观看| 日韩免费观看高清完整版 | 综合精品久久久| 色老汉一区二区三区| 亚洲欧美偷拍另类a∨色屁股| 国产精品久久久99| 国产精品久久久久婷婷二区次| 精品国产一区二区三区不卡| 欧美手机在线视频| 日韩av中文字幕一区二区| 91国产成人在线| 国产精品免费视频一区| 久久久91精品国产一区二区精品| 国产精品一区二区三区网站| 激情图区综合网| 亚洲欧美日韩国产一区二区三区 | 色综合av在线| 国产欧美综合色| 中文字幕在线观看一区二区| 欧美久久婷婷综合色| 色综合久久九月婷婷色综合| 中文字幕欧美国产| 欧美高清在线一区二区| 韩国av一区二区| 国产一区二区三区黄视频 | 综合色天天鬼久久鬼色| 精品日产卡一卡二卡麻豆| 欧洲av在线精品| 亚洲欧洲av另类| 久久久久久97三级| 8v天堂国产在线一区二区| 成人永久看片免费视频天堂| 国产亚洲污的网站| 亚洲妇熟xx妇色黄| 艳妇臀荡乳欲伦亚洲一区| 国产精品久久久久7777按摩 | 欧美精品三级在线观看| 波多野结衣在线aⅴ中文字幕不卡 波多野结衣在线一区 | 久久精品国产亚洲a| 暴力调教一区二区三区| 老色鬼精品视频在线观看播放| av电影在线观看完整版一区二区| 欧美日本一区二区三区四区 | 欧美在线观看视频在线| 欧美高清你懂得| 欧美国产日韩a欧美在线观看| 色婷婷久久久久swag精品| 欧美一级生活片| 亚洲一二三专区| 欧美日韩一级片网站| 337p亚洲精品色噜噜噜| 久久精品人人做人人综合| 洋洋av久久久久久久一区| 麻豆一区二区99久久久久| 成年人国产精品| 91麻豆精品国产91久久久久| 国产精品久久久久久久蜜臀 | 精品一区二区三区免费观看| 国产99精品国产| 欧美日韩成人一区| 中文字幕一区二区三区不卡在线 | 欧美影院一区二区三区| 久久亚洲综合av| 偷拍日韩校园综合在线| av一区二区久久| 26uuu精品一区二区三区四区在线| 蜜桃av一区二区| 欧美亚洲一区三区| 国产精品网站在线播放| 毛片av中文字幕一区二区| 日本精品裸体写真集在线观看| 久久久久久久国产精品影院| 日韩有码一区二区三区| 91日韩一区二区三区| 欧美国产激情一区二区三区蜜月| 日本成人中文字幕在线视频| 在线观看亚洲专区| 国产精品福利影院| 国产精品资源站在线| 精品少妇一区二区三区在线播放| 亚洲一区av在线| 色悠悠亚洲一区二区| 中文字幕五月欧美| 成人免费福利片| 欧美韩日一区二区三区四区| 国产尤物一区二区| 欧美大片在线观看一区二区| 日产国产高清一区二区三区| 欧美日韩综合在线| 亚洲美女视频在线观看| 成人一区二区三区视频在线观看| 欧美精品一区二区蜜臀亚洲| 麻豆成人91精品二区三区| 日韩一二三区视频| 日本成人中文字幕在线视频| 91精品国产欧美日韩| 日韩中文欧美在线| 欧美一区二区三区成人| 热久久免费视频| 欧美大尺度电影在线| 精品制服美女丁香| 久久午夜免费电影| 国产成人精品网址| 欧美国产精品一区二区三区| 成人性生交大合| 中文字幕一区二区三区不卡| 99久久国产免费看| 亚洲色图在线看| 欧美色爱综合网| 日本成人超碰在线观看| 亚洲精品在线一区二区| 国产高清成人在线| 亚洲婷婷综合色高清在线| 在线观看日韩毛片| 成人avav影音| 亚洲精品精品亚洲| 欧美三级三级三级爽爽爽| 日韩av网站免费在线| 久久亚洲综合色一区二区三区| 国产精品99久| 亚洲激情综合网| 这里只有精品99re| 国产伦精品一区二区三区免费迷 | 欧美成人午夜电影| 国产一区二区三区香蕉| 国产精品初高中害羞小美女文| 日本久久精品电影| 蜜桃在线一区二区三区| 欧美激情资源网| 欧美三电影在线| 精品一区二区三区在线观看| 国产精品网站导航| 欧美色图一区二区三区| 麻豆精品视频在线观看| 中文字幕一区三区| 欧美一区永久视频免费观看| 成人美女在线观看| 日韩国产一区二|