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)
Sun, May 12, 7:51 AM
Unknown Object (File)
Wed, May 8, 6:01 PM
Unknown Object (File)
Wed, May 8, 6:01 PM
Unknown Object (File)
Wed, May 8, 6:00 PM
Unknown Object (File)
Wed, May 8, 1:22 PM
Unknown Object (File)
Tue, May 7, 10:52 AM
Unknown Object (File)
Mon, May 6, 7:24 AM
Unknown Object (File)
Wed, Apr 24, 10:29 PM
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.