datastruct: Employ new scheme for code snippet
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | fcvextract.pl: Enhance comment block handling of C sourceutilities/ | +77 | 0 replies | |
| 2/11 | CodeSamples: Add explicit 'keepcomment=yes' optionsCodeSamples/ CodeSamples/ CodeSamples/ +2 more | +13 | 0 replies | |
| 3/11 | fcvextract.pl: Make 'keepcomment=no' as defaultutilities/ | +5 | 0 replies | |
| 4/11 | CodeSamples: Remove redundant \fcvexcludeCodeSamples/ CodeSamples/ CodeSamples/ +9 more | +80 | 0 replies | |
| 5/11 | fcvextract.pl: Support '/* \lnlbl{...} */' style label in C sourceutilities/ | +5 | 0 replies | |
| 6/11 | datastruct: Employ new scheme for snippets of hash_bkt.cCodeSamples/ datastruct/ | +111 | 0 replies | |
| 7/11 | datastruct: Update hashdiagram figuredatastruct/ | +53 | 0 replies | |
| 8/11 | datastruct: Employ new scheme for snippets of hash_bkt_rcu and hash_resizeCodeSamples/ CodeSamples/ datastruct/ | +284 | 0 replies | |
| 9/11 | Make sure lmtt font is used in 'VerbatimL' and 'Verbatim' envperfbook.tex | +2 | 0 replies | |
| 10/11 | Use wider tabsize for snippet in 'listing*'CodeSamples/ | +1 | 0 replies | |
| 11/11 | datastruct: Tweak hyphenationdatastruct/ pfhyphex.tex | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] datastruct: Employ new scheme for code snippet
Hi Paul,
This patch set consists of enhancement of fcvextract.pl, update of snippets in datastruct, and some minor tweaks.
fcvextract.pl now suppresses comment blocks in C source and supports alternative code for snippets in #ifndef blocks, which won't be affected by the suppression of comment blocks.
Also, labeling of the form /* \lnlbl{label} */ is now supported in C snippets.
Patch #1 adds comment block handling to fcvextract.pl, without changing the default behavior.
Patch #2 adds a couple of explicit options to snippets which have comments to be displayed. It also converts alternative code fragments using "#ifndef FCV_EXCLUDE" so that they survive comment block suppression.
Patch #3 changes the default to "keepcomment=no". This removes a couple of comments in Listings 4.8 and 9.5.
Patch #4 removes now redundant "\fcvexclude" around comment blocks. It also uses "#ifndef FCV_SNIPPET" to reduce \fcvexclude uses.
Patch #5 adds support of "/* \lnlbl{label} */" labeling.
Patch #6 updates snippets of hash_bkt.c. "struct hashtab" now has the "ht_cmp" field and I updated the text to mention it. You might want to do some rewording.
Patch #7 adds the "ht_cmp" field in the hashdiagram figure (still in .fig).
Patch #8 updates the rest of snippets in datastruct. It also fixes typo in cross references of Listing 10.13. By this change, an smp_mb() appears in ht_get_bucket() (Listing 10.10).
My guess is that the counterpart barrier is the first synchronize_rcu() in hashtab_resize(). It might deserve some explanation or a Quick Quiz. Also, Answer to Quick Quiz 10.13 might need some expansion, since it looks as though hash_reorder.c used something more than the pure RCU protection. But I might be completely misreading here...
Patches #9 and #10 are minor tweaks in appearance of Listing 10.13. As you can see, tab-space width can be adjusted per snippet.
Patch #11 permits more chances of hyphenation.
I'm thinking of globally widening tab space of snippets for 1C layout. Let me do some experiment.
Thanks, Akira
--
Akira Yokosawa (11):
fcvextract.pl: Enhance comment block handling of C source
CodeSamples: Add explicit 'keepcomment=yes' options fcvextract.pl: Make 'keepcomment=no' as default
CodeSamples: Remove redundant \fcvexclude fcvextract.pl: Support '/* \lnlbl{...} */' style label in C source
datastruct: Employ new scheme for snippets of hash_bkt.c
datastruct: Update hashdiagram figure
datastruct: Employ new scheme for snippets of hash_bkt_rcu and
hash_resize
Make sure lmtt font is used in 'VerbatimL' and 'Verbatim' env Use wider tabsize for snippet in 'listing*'
datastruct: Tweak hyphenation
CodeSamples/SMPdesign/lockhdeq.c | 11 +- CodeSamples/SMPdesign/smpalloc.c | 8 +- CodeSamples/count/count_end.c | 8 +- CodeSamples/count/count_lim.c | 8 +- CodeSamples/count/count_tstat.c | 10 +- CodeSamples/datastruct/hash/hash_bkt.c | 96 ++-- CodeSamples/datastruct/hash/hash_bkt_rcu.c | 33 +- CodeSamples/datastruct/hash/hash_resize.c | 232 +++++----- CodeSamples/defer/route_hazptr.c | 20 +- CodeSamples/defer/route_rcu.c | 36 +- CodeSamples/defer/route_refcnt.c | 16 +- CodeSamples/defer/route_seq.c | 18 +- CodeSamples/defer/route_seqlock.c | 14 +- CodeSamples/defer/seqlock.h | 12 +- CodeSamples/locking/locked_list.c | 6 +- CodeSamples/toolsoftrade/forkjoinvar.c | 2 +- CodeSamples/toolsoftrade/pcreate.c | 2 +- datastruct/datastruct.tex | 687 ++++++++--------------------- datastruct/hashdiagram.fig | 103 ++--- perfbook.tex | 2 + pfhyphex.tex | 1 + utilities/fcvextract.pl | 87 +++- 22 files changed, 627 insertions(+), 785 deletions(-)
Signature · 1 line
2.7.4