You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we have removed some functions from the parent jump tables, we need a way to access them.
Currently in the x_Init and x_RegDump fns we are simply accessing the ones outside the tables explicitly, before looping through the jump table.
However, in x_ConfigReg we are simply passing in a member config_register from the host object. This member is just an index for the fn in the jump table. Instead of doing this, simply pass in a function pointer and save it locally to ensure reentrance is not an issue.
This way, we can access fns inside the parent jump table OR the outside the jump table.
The text was updated successfully, but these errors were encountered:
bitshiftnetau
changed the title
Pass function pointer through interface x_ConfigReg
Pass function pointer through interface (x_ConfigReg, x_QueryReg, x_Reset etc)
Jun 4, 2019
Now that we have removed some functions from the parent jump tables, we need a way to access them.
Currently in the x_Init and x_RegDump fns we are simply accessing the ones outside the tables explicitly, before looping through the jump table.
However, in x_ConfigReg we are simply passing in a member config_register from the host object. This member is just an index for the fn in the jump table. Instead of doing this, simply pass in a function pointer and save it locally to ensure reentrance is not an issue.
This way, we can access fns inside the parent jump table OR the outside the jump table.
The text was updated successfully, but these errors were encountered: