tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] style(5): No struct typedefs



> On Jul 14, 2023, at 2:56 AM, Martin Husemann <martin%duskware.de@localhost> wrote:
> 
> The typedef itself buys you nothing but a few charactes less to type,

No, that’s not correct.  For a type that’s meant to be “opaque” (i.e. “users of the interface should not have to know or care about any of the implementation details, historical leakage be damned”), the typedef gives you true opacity… if you’re using “struct kmutex *” rather than “kmutex_t *” then you’re already eating the forbidden fruit.

-- thorpej



Home | Main Index | Thread Index | Old Index