Page MenuHomeFreeBSD

Remove uses of the deprecated timeout_t typedef.
AbandonedPublic

Authored by jhb on Nov 28 2019, 8:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 3:29 PM
Unknown Object (File)
Wed, Nov 20, 1:44 PM
Unknown Object (File)
Tue, Nov 5, 2:33 PM
Unknown Object (File)
Tue, Oct 29, 3:50 AM
Unknown Object (File)
Oct 14 2024, 11:23 AM
Unknown Object (File)
Oct 14 2024, 11:23 AM
Unknown Object (File)
Oct 14 2024, 11:11 AM
Unknown Object (File)
Oct 2 2024, 2:06 PM

Details

Reviewers
kib
Group Reviewers
transport
Summary

In some cases, remove casts by changing callout functions to accept
a void * argument and adding an assignment to a pointer of the desired
type. In other cases, expand the typedef.

Test Plan
  • compile tested, booted in an amd64 VM

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27844
Build 26021: arc lint + arc unit

Event Timeline

I do not object, but what is wrong with the typedef itself ? It is in fact useful, since you have to spell the function pointer type explicitly more than once, esp. in casts.

The typedef itself is for the old API that I'm planning to remove. It's name doesn't make much sense for callout_*(). We could perhaps define a new callout_handler_t or some such in callout.h, but it's not clear to me that would really be better. The only casts here are 2 in uart_core.c. I don't mind renaming the typedef and keeping it for the uart casts (and using it in callout.h and a few other places in follow-on patches), but I don't think the timeout_t name or systm.h header are the right ones going forward.