Page MenuHomeFreeBSD

Remove uses of the deprecated timeout_t typedef.

Authored by jhb on Thu, Nov 28, 8:44 PM.


Group Reviewers

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

rS FreeBSD src repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 27844
Build 26021: arc lint + arc unit

Event Timeline

jhb created this revision.Thu, Nov 28, 8:44 PM
kib accepted this revision.Thu, Nov 28, 9:55 PM

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.

jhb added a comment.Mon, Dec 2, 5:47 PM

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.

jhb abandoned this revision.Tue, Dec 10, 9:59 PM

Superseded by D22751 and D22752.