lwip/core/raw.c
/**
 * Remove an RAW PCB.
 *
 * @param pcb RAW PCB to be removed. The PCB is removed from the list of
 * RAW PCB's and the data structure is freed from memory.
 *
 * @see raw_new()
 */
Remove an RAW PCB.
@param pcb RAW PCB to be removed. The PCB is removed from the list of
RAW PCB's and the data structure is freed from memory.


Remove an RAW PCB . @param pcb RAW PCB to be removed . The PCB is removed from the list of RAW PCB ' s and the data structure is freed from memory .
void
raw_remove(struct raw_pcb *pcb)
{
  struct raw_pcb *pcb2;
  if (raw_pcbs == pcb) {
    raw_pcbs = raw_pcbs->next;
  } else for(pcb2 = raw_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
    if (pcb2->next != NULL && pcb2->next == pcb) {
      pcb2->next = pcb->next;
    }
  }
  memp_free(MEMP_RAW_PCB, pcb);
}
void raw_remove ( struct raw_pcb * pcb ) { struct raw_pcb * pcb2 ; if ( raw_pcbs == pcb ) { raw_pcbs = raw_pcbs -> next ; } else for ( pcb2 = raw_pcbs ; pcb2 != NULL ; pcb2 = pcb2 -> next ) { if ( pcb2 -> next != NULL && pcb2 -> next == pcb ) { pcb2 -> next = pcb -> next ; } } memp_free ( MEMP_RAW_PCB , pcb ) ; }
Remove an RAW PCB.
Remove an RAW PCB .
/* pcb to be removed is first in list? */ /* make list start at 2nd pcb */ /* pcb not 1st in list */ /* find pcb in raw_pcbs list */ /* remove pcb from list */