Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass function pointer through interface (x_ConfigReg, x_QueryReg, x_Reset etc) #8

Open
bitshiftnetau opened this issue Jun 4, 2019 · 0 comments
Assignees

Comments

@bitshiftnetau
Copy link
Owner

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.

@bitshiftnetau bitshiftnetau self-assigned this Jun 4, 2019
@bitshiftnetau 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant