Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/net



Module Name:    src
Committed By:   roy
Date:           Fri Feb 19 20:05:43 UTC 2016

Modified Files:
        src/sys/net: if.c if.h

Log Message:
Implement a queue for if_link_state_change() calls to fix a race condition
introduced in the prior patch.

The queue has capacity to store 8 link state changes, if it overflows then
the oldest state change is lost, but the oldest DOWN state change is
preserved to ensure any subsequent UP state changes reflect properly.

Because there are only 3 states to queue, the queue itself is implemented
by storing 2-bit numbers in a bigger one.
To increase the size of the queue, just increase the size of the backing
store to a bigger number.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.325 src/sys/net/if.c
cvs rdiff -u -r1.197 -r1.198 src/sys/net/if.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index