kernel/code: Convert struct klist from an SLIST to a TAILQ (Part 1)
completed by: rfw
mentors: Samuel J. Greear
This task will involve converting numerous uses of a data structure known as an SLIST to a TAILQ. The documentation for these can be found in the system manpage QUEUE(3).
Convert struct klist, used by struct kqinfo to a TAILQ in the header, sys/event.h. Fix the knote_* functions in kern/kern_event.c to use the TAILQ macro's when operating on a klist. Deliverable: Provide a patch or push a git branch with these source changes.
Create a list of all drivers and/or kernel source files that manipulate a struct klist. The name of the struct member should always be known as ki_note, to make grepping easy, and should always be operated on only by the knote_* functions fixed previously. If any instances are found where this is not the case, these should be noted and reported.
TAILQ's require proper initialization before use, whereas SLIST's do not. Identify the initialization functions by source filename and function name inside which the TAILQ_INIT() calls which will initialize the TAILQ's should be placed. Deliverable: Provide an organized list of this information.