This commit delivers a comprehensive set of updates including development
environment setup, advanced spinlock features, initial IPC robustness
KASSERTs, extensive Doxygen commenting, code formatting, and Doxygen setup.
Key Changes:
Part 0: Development Environment Setup
- Created `setup.sh` to automate installation of `doxygen`, `graphviz`,
`clang-format`, and `cppcheck`. (Tools were installed in the environment).
Part 1: Advanced Spinlock Features
- Enhanced `simple_spin_lock()` in `kernel/k_spinlock.h` with:
- Adaptive spinning: `MAX_SPIN_THRESHOLD` and a stubbed `kernel_yield()`
(calling `arch_pause()`).
- Contention statistics: `acquisitions` and `contentions` counters
added to `simple_spinlock_t` and integrated into lock functions.
- Added extensive Doxygen and inline comments for all spinlock code.
- Updated `docs/Signal_Refactoring_Verification.md` with these features.
Part 2: Initial IPC Robustness Analysis & KASSERTs
- Implemented an initial set of KASSERTs in `kernel/system.c` (in
`kernel_call`, `kernel_call_dispatch`, `kernel_call_finish`) for
validating IPC message parameters, call numbers, privileges, and
internal states.
- Added Doxygen/inline comments to these IPC functions.
- Created `docs/IPC_Robustness_Analysis.md` documenting these KASSERTs
and areas for further IPC validation.
Part 3: Code Formatting, Doxygen Setup & Review
- Code Formatting: Applied `clang-format --style=Google` to all C/H
files modified in recent KASSERT and spinlock work.
- Static Analysis: Ran `cppcheck`; no critical issues found in recent
changes requiring immediate code modification.
- Doxygen Setup: Created `docs/Doxyfile.kernel` with a comprehensive,
C23-aware configuration based on your feedback. This file enables
generation of extensive kernel documentation.
- `docs/Lock_Ordering.md`: Reviewed; no updates needed in this pass.
This work significantly improves kernel robustness, developer tooling,
code quality, and documentation infrastructure.
28 lines
777 B
Makefile
28 lines
777 B
Makefile
LATEX_CMD?=pdflatex
|
|
MKIDX_CMD?=makeindex
|
|
BIBTEX_CMD?=bibtex
|
|
LATEX_COUNT?=8
|
|
MANUAL_FILE?=refman
|
|
|
|
all: $(MANUAL_FILE).pdf
|
|
|
|
pdf: $(MANUAL_FILE).pdf
|
|
|
|
$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex
|
|
$(LATEX_CMD) $(MANUAL_FILE)
|
|
$(MKIDX_CMD) $(MANUAL_FILE).idx
|
|
$(LATEX_CMD) $(MANUAL_FILE)
|
|
latex_count=$(LATEX_COUNT) ; \
|
|
while grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\
|
|
do \
|
|
echo "Rerunning latex...." ;\
|
|
$(LATEX_CMD) $(MANUAL_FILE) ;\
|
|
latex_count=`expr $$latex_count - 1` ;\
|
|
done
|
|
$(MKIDX_CMD) $(MANUAL_FILE).idx
|
|
$(LATEX_CMD) $(MANUAL_FILE)
|
|
|
|
|
|
clean:
|
|
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf
|