Page MenuHomeFreeBSD

itimers: strip unused bits from struct itimer and struct itimers
ClosedPublic

Authored by kib on Dec 27 2021, 6:39 PM.
Tags
None
Referenced Files
F108920956: D33670.id.diff
Wed, Jan 29, 2:17 PM
Unknown Object (File)
Mon, Jan 27, 5:06 PM
Unknown Object (File)
Sun, Jan 26, 6:06 PM
Unknown Object (File)
Sun, Jan 19, 4:35 PM
Unknown Object (File)
Sun, Jan 19, 4:21 PM
Unknown Object (File)
Sun, Jan 19, 4:16 PM
Unknown Object (File)
Sat, Jan 18, 2:40 PM
Unknown Object (File)
Tue, Jan 14, 1:23 AM
Subscribers

Details

Summary

Also:

itimers_alloc: no need to initialize its_timers array

struct itimers is allocated with M_ZERO, setting all members to NULL
is tautological.

This seems to be unused definitions, going back to David Xu times and work. At least, kernel builds and boots multiuser with the patch.

Diff Detail

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

Event Timeline

kib requested review of this revision.Dec 27 2021, 6:39 PM

I agree: those elements have been unused for a long time.

This revision is now accepted and ready to land.Dec 27 2021, 6:50 PM

I haven't touched that code for years, so I have no idea what are those unused definitions and won't miss them.

markj added inline comments.
sys/sys/timers.h
59 ↗(On Diff #100619)

It looks like it_timerid is write-only too. Maybe I'm missing something.

kib marked an inline comment as done.

Remove it_timerid.

This revision now requires review to proceed.Dec 27 2021, 9:17 PM
This revision is now accepted and ready to land.Dec 27 2021, 9:43 PM