> Dispatching to per-type functions (instead of per-size ones) is mere busy
Having a function per each supported size plus one for emulated locking is still safer than having a pair, where one deals with opaque data type.
> all that code is generated and implementation specific, not user
It is visible.
Having a clear and reasonable error messages is reasonable as well. This is easier to implement it at compiler site.