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)
Sat, Apr 13, 9:06 PM
Unknown Object (File)
Sat, Apr 13, 9:06 PM
Unknown Object (File)
Sat, Apr 13, 8:04 PM
Unknown Object (File)
Feb 19 2024, 7:58 PM
Unknown Object (File)
Feb 17 2024, 4:17 PM
Unknown Object (File)
Feb 13 2024, 8:16 AM
Unknown Object (File)
Dec 22 2023, 11:16 PM
Unknown Object (File)
Dec 12 2023, 9:50 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.