> On Aug 22, 2021, at 9:28 AM, Taylor R Campbell 
> <campbell+netbsd-tech-k...@mumble.net> wrote:
> 
>> As for the way device_call() works, propose an alternative with the
>> following attributes: [...]
> 
> Here's a sketch of a typed version of what I think is essentially the
> same thing the untyped device_call does:
> 
> typedef struct {
>       void *private;
>       struct devhandle_ops *ops;  /* `vtable', if you will */
> } devhandle_t;
> 
> struct devhandle_ops_v1 {
>       int (*dho_getprop_string)(devhandle_t, const char *, int, uint32_t *);
>       ...
> };
> ...
> struct devhandle_ops {
>       unsigned version;
>       struct devhandle_ops_v1 v1;
>       struct devhandle_ops_v2 v2;
>       ...
> };

This proposal does not have all of the attributes I laid out.  Please go back 
and read what I said again.

-- thorpej

Reply via email to