> 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
- Re: General device properties ... Michael van Elst
- Re: General device properties ... Jason Thorpe
- Re: General device properties API David Holland
- Re: General device properties API Jason Thorpe
- Re: General device properties API Michael
- Re: General device properties API Jason Thorpe
- Re: General device properties API Jason Thorpe
- Re: General device properties API Taylor R Campbell
- Re: General device properties API Jason Thorpe
- Re: General device properties API Taylor R Campbell
- Re: General device properties API Jason Thorpe
- Re: General device properties API Taylor R Campbell
- Re: General device properties ... Jason Thorpe
- Re: General device properties ... Taylor R Campbell
- Re: General device properties ... Jason Thorpe
- Re: General device properties ... Taylor R Campbell
- Re: General device properties ... Jason Thorpe
- Re: General device properties ... Taylor R Campbell
- Re: General device properties ... Jason Thorpe
- Re: General device properties ... Taylor R Campbell
- untyped device calls (was: Re:... David Holland