Changes between Initial Version and Version 1 of Ticket #57, comment 1
- Timestamp:
- Oct 31, 2010, 5:37:15 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #57, comment 1
initial v1 1 Could we do: 1 Could we do something like: 2 3 = API proposal = 2 4 3 5 {{{ … … 44 46 }}} 45 47 46 Then to access funcs of type BAR: 48 == Accessing functions of a given class == 47 49 48 50 {{{ … … 62 64 return &drv->funcs[offset]; 63 65 } 66 }}} 64 67 68 == Example for implementing a generic function of class BAR == 69 70 {{{ 71 #!c 65 72 void device_bar_op1(struct device_s *dev, …) 66 73 { … … 72 79 }}} 73 80 81 = Rationale = 82 74 83 Added from current code, there is a new indirection through {{{drv->funcs_offset}}}. 75 84 * There is a cost for a byte load in addition to current implementation