Page MenuHomeFreeBSD

libthr: thr_attr.c: Clarity, whitespace and style
ClosedPublic

Authored by olce on Dec 12 2023, 3:41 PM.
Tags
None
Referenced Files
F102742340: D43005.diff
Sat, Nov 16, 2:34 PM
Unknown Object (File)
Oct 5 2024, 11:58 AM
Unknown Object (File)
Oct 5 2024, 9:36 AM
Unknown Object (File)
Oct 2 2024, 7:16 PM
Unknown Object (File)
Sep 24 2024, 3:09 PM
Unknown Object (File)
Sep 24 2024, 3:09 PM
Unknown Object (File)
Sep 24 2024, 3:09 PM
Unknown Object (File)
Sep 24 2024, 3:09 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 55223
Build 52112: arc lint + arc unit

Event Timeline

olce requested review of this revision.Dec 12 2023, 3:41 PM
lib/libthr/thread/thr_attr.c
134–136

not sure about this to two lines

lib/libthr/thread/thr_attr.c
134–136

You mean, splitting the original single line declaring attr and dst? I think I did that to follow style(9) on ordering by decreasing sizes (because attr is the full structure whereas dst is just a pointer), since all objects are arguably (almost) equally used. But really I don't mind that much.

I suspect that this style requirement comes from a time when compilers would not reorder declarations in functions, so ordering them by size may then have been useful to lower stack usage, but today I wouldn't be surprised if compilers don't follow the written order, making the point moot.

lib/libthr/thread/thr_attr.c
134–136

Yes precisely that.

Fold back two lines of declarations.

olce marked 2 inline comments as done.Jan 3 2024, 8:45 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 4 2024, 10:45 AM
This revision was automatically updated to reflect the committed changes.