This is a more extendable version than traditional hashinit(9). It allows
different kinds of slot headers with optional locks.
Implement traditional hashinit()/hashdestroy() on top of it.
Differential D55904
hash(9): introduce hashalloc()/hashfree() KPI Authored by glebius on Tue, Mar 17, 7:27 PM.
Details
This is a more extendable version than traditional hashinit(9). It allows Implement traditional hashinit()/hashdestroy() on top of it.
Diff Detail
Event TimelineComment Actions Do you need to validate the enum value is know? Can the lock and list types be automatically detected with _Generic somehow? Comment Actions Do you mean if somebody passes a numeric instead of one of enum values? I think our compiler flags will forbid that.
I don't see a way to use _Generic facing outside of the KPI. It might be possible to make some use of it internally, I'll look into that. Comment Actions I'm thinking default: would make sure.
Sure. |