Lines Matching refs:next

416 -  lwip_stats.mem.used -= mem->next - ((u8_t *)mem - ram);
418 + MEM_STATS_DEC_USED(used, mem->next - ((u8_t *)mem - ram));
420 /* finally, see if prev or next are free also */
473 mem2 = (struct mem *)&ram[mem->next];
513 + ptr = ((struct mem *)&ram[ptr])->next) {
530 - ptr = ((struct mem *)&ram[ptr])->next) {
534 - (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
536 - * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */
538 - if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) {
543 - * mem->next - (ptr + (2*SIZEOF_STRUCT_MEM)) == size,
544 - * struct mem would fit in but no data between mem2 and mem2->next
546 - * region that couldn't hold data, but when mem->next gets freed,
553 - mem2->next = mem->next;
555 - /* and insert it between mem and mem->next */
556 - mem->next = ptr2;
559 - if (mem2->next != MEM_SIZE_ALIGNED) {
560 - ((struct mem *)&ram[mem2->next])->prev = ptr2;
567 + (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
569 + * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */
571 + if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)…
576 + * mem->next - (ptr + (2*SIZEOF_STRUCT_MEM)) == size,
577 + * struct mem would fit in but no data between mem2 and mem2->next
579 + * region that couldn't hold data, but when mem->next gets freed,
586 + mem2->next = mem->next;
588 + /* and insert it between mem and mem->next */
589 + mem->next = ptr2;
592 + if (mem2->next != MEM_SIZE_ALIGNED) {
593 + ((struct mem *)&ram[mem2->next])->prev = ptr2;
597 + /* (a mem2 struct does no fit into the user data space of mem and mem->next will always
601 + * also can't move mem->next directly behind mem, since mem->next
605 + MEM_STATS_INC_USED(used, mem->next - ((u8_t *)mem - ram));
609 - /* (a mem2 struct does no fit into the user data space of mem and mem->next will always
613 - * also can't move mem->next directly behind mem, since mem->next
618 - lwip_stats.mem.used += mem->next - ((u8_t *)mem - ram);
626 - /* Find next free block after mem and update lowest free pointer */
628 - lfree = (struct mem *)&ram[lfree->next];
630 + /* Find next free block after mem and update lowest free pointer */
635 + lfree = (struct mem *)&ram[lfree->next];
733 memp->next = memp_tab[type];
845 + for (last = r; last->next != NULL; last = last->next);
850 + netif->loop_last->next = r;
892 + LWIP_ASSERT("bogus pbuf: len != tot_len but next == NULL!", in_end->next != NULL);
893 + in_end = in_end->next;
901 + netif->loop_first = in_end->next;
905 + in_end->next = NULL;
932 + /* proceed to next network interface */
933 + netif = netif->next;
1098 if (!timeouts || !timeouts->next) {
1104 if (timeouts->next->time > 0) {
1106 - time = sys_arch_mbox_fetch(mbox, msg, timeouts->next->time);
1107 + time_needed = sys_arch_mbox_fetch(mbox, msg, timeouts->next->time);
1123 - if (time < timeouts->next->time) {
1124 - timeouts->next->time -= time;
1125 + if (time_needed < timeouts->next->time) {
1126 + timeouts->next->time -= time_needed;
1128 timeouts->next->time = 0;
1142 if (timeouts->next->time > 0) {
1143 - time = sys_arch_sem_wait(sem, timeouts->next->time);
1144 + time_needed = sys_arch_sem_wait(sem, timeouts->next->time);
1159 - if (time < timeouts->next->time) {
1160 - timeouts->next->time -= time;
1161 + if (time_needed < timeouts->next->time) {
1162 + timeouts->next->time -= time_needed;
1164 timeouts->next->time = 0;
1219 /* The incoming segment is the next in sequence. We check if
1225 - tcp_seg_free(next);
1226 - if (cseg->next != NULL) {
1227 - next = cseg->next;
1228 - if (TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
1230 - cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
1232 + tcp_seg_free(next);
1233 + if (cseg->next != NULL) {
1234 + next = cseg->next;
1235 + if (TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
1237 + cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
1413 (void *)q, (void *)q->next));
1419 + /* just executing this next line is probably faster that the if statement needed
1504 for(q = p; q != NULL; q = q->next) {
2244 - LWIP_ASSERT("bogus pbuf: len != tot_len but next == NULL!", in_end->next != NULL);
2245 - in_end = in_end->next;
2253 - priv->first = in_end->next;
2260 - if(in_end->next != NULL) {
2262 - in_end->next = NULL;
2331 - for (last = r; last->next != NULL; last = last->next);
2335 - priv->last->next = r;