mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
docs: update tcp_kill_prio same priority comments
tcp_kill_prio will kill the oldest active connection of same/lower priority. Update all comments so that it's clear the same priority can be killed
This commit is contained in:
parent
b18e6a8734
commit
b296d2c7bb
@ -1635,7 +1635,7 @@ tcp_kill_prio(u8_t prio)
|
|||||||
|
|
||||||
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
|
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
|
||||||
|
|
||||||
/* We kill the oldest active connection that has lower priority than prio. */
|
/* We kill the oldest active connection that has the same or lower priority than prio. */
|
||||||
inactivity = 0;
|
inactivity = 0;
|
||||||
inactive = NULL;
|
inactive = NULL;
|
||||||
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
||||||
@ -1742,8 +1742,8 @@ tcp_alloc(u8_t prio)
|
|||||||
/* Try to allocate a tcp_pcb again. */
|
/* Try to allocate a tcp_pcb again. */
|
||||||
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
||||||
if (pcb == NULL) {
|
if (pcb == NULL) {
|
||||||
/* Try killing active connections with lower priority than the new one. */
|
/* Try killing oldest active connection with the same or lower priority than the new one. */
|
||||||
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio));
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing oldest connection with prio same/lower than %d\n", prio));
|
||||||
tcp_kill_prio(prio);
|
tcp_kill_prio(prio);
|
||||||
/* Try to allocate a tcp_pcb again. */
|
/* Try to allocate a tcp_pcb again. */
|
||||||
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
||||||
|
Loading…
Reference in New Issue
Block a user