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
Unknown Object (File)
Thu, Dec 12, 11:09 PM
Unknown Object (File)
Wed, Dec 11, 10:47 PM
Unknown Object (File)
Nov 17 2024, 10:11 AM
Unknown Object (File)
Nov 16 2024, 5:51 PM
Unknown Object (File)
Nov 16 2024, 5:30 PM
Unknown Object (File)
Nov 16 2024, 4:24 PM
Unknown Object (File)
Nov 16 2024, 2:34 PM
Unknown Object (File)
Oct 5 2024, 11:58 AM
Subscribers

Diff Detail

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

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.