Page MenuHomeFreeBSD

locking.9: Tweak the table column width to fix 80 characters
ClosedPublic

Authored by zlei on Dec 8 2025, 10:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 28, 5:20 AM
Unknown Object (File)
Fri, Jan 16, 3:59 PM
Unknown Object (File)
Thu, Jan 15, 6:34 PM
Unknown Object (File)
Thu, Jan 8, 5:31 AM
Unknown Object (File)
Thu, Jan 8, 2:26 AM
Unknown Object (File)
Tue, Jan 6, 3:17 AM
Unknown Object (File)
Dec 25 2025, 12:56 AM
Unknown Object (File)
Dec 23 2025, 11:26 PM
Subscribers

Details

Summary

While here, add some white spaces to improve the readability of source
code.

MFC after: 1 week

Test Plan

Do lint check, and verify the rendered table,

# mandoc -Tlint share/man/man9/locking.9
# mandoc share/man/man9/locking.9
...
               You want:  spin mtx  mutex/rw  rmlock  sleep rm  sx/lk  sleep
        You have:         --------  --------  ------  --------  -----  ------
        spin mtx          ok        no        no      no        no     no-1
        mutex/rw          ok        ok        ok      no        no     no-1
        rmlock            ok        ok        ok      no        no     no-1
        sleep rm          ok        ok        ok      ok-2      ok-2   ok-2/3
        sx                ok        ok        ok      ok        ok     ok-3
        lockmgr           ok        ok        ok      ok        ok     ok

...

        Context:           spin mtx  mutex/rw  rmlock  sleep rm  sx/lk  sleep
        interrupt filter:  ok        no        no      no        no     no
        interrupt thread:  ok        ok        ok      no        no     no
        callout:           ok        ok        ok      no        no     no
        direct callout:    ok        no        no      no        no     no
        system call:       ok        ok        ok      ok        ok     ok

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Dec 8 2025, 10:00 AM

This looks better in less, but the syntax is still wrong so I just know in my little heart that it's going to be broken somewhere. Man.f.o is particularly intolerant of column syntax abuse. Try this:

share/man/man9/locking.9
376

You want one column field for each column, which is set to the longest field contained in that column.

377

With the columns fixed above this becomes too far unless this changes too.

378

The width is set by the width set in the Bl macro, so these spaces makes me nervous.

ziaee requested changes to this revision.Dec 8 2025, 3:36 PM

Oops, forgot to request change

This revision now requires changes to proceed.Dec 8 2025, 3:36 PM

Addressed @ziaee 's comment.

zlei marked 3 inline comments as done.Dec 9 2025, 2:40 PM

The lint check complains,

% mandoc -Tlint share/man/man9/locking.9  
mandoc: share/man/man9/locking.9:375:23: STYLE: no blank before trailing delimiter: Em        You want:
mandoc: share/man/man9/locking.9:376:16: STYLE: no blank before trailing delimiter: Em You have:
mandoc: share/man/man9/locking.9:411:15: STYLE: no blank before trailing delimiter: Em Context:

That appears to be false report. I can confirm it is caused by the last colon.

Sorry I forgot about this! This is a great improvement.

If you want, you can silence those linter warnings by prepending a zero width space, \&.

This revision is now accepted and ready to land.Dec 23 2025, 2:26 PM

Sorry I forgot about this! This is a great improvement.

If you want, you can silence those linter warnings by prepending a zero width space, \&.

Thanks for the hint.

The lint warning should be trivial and I'm going to land the revision as is.