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

Camkes Next: Silently ignores string attribute #6

Open
agacek opened this issue Dec 15, 2016 · 2 comments
Open

Camkes Next: Silently ignores string attribute #6

agacek opened this issue Dec 15, 2016 · 2 comments
Assignees

Comments

@agacek
Copy link

agacek commented Dec 15, 2016

Previously in Camkes you could specify an attribute as a string:

dispatch_periodic_inst.timer_attributes = "10";

In Camkes Next, this declaration is ignored and the attribute is treated as 0. I understand I should instead use

dispatch_periodic_inst.timer_attributes = 10;

But it would be much nicer if Camkes Next would give an error message about the first version instead of silently ignoring it.

See:
https://github.com/seL4/camkes-tool/blob/next/camkes/templates/rpc-connector-common-from.c#L43
https://github.com/seL4/camkes-tool/blob/next/camkes/templates/rpc-connector-common-from.c#L67

agacek pushed a commit to agacek/camkes-tool that referenced this issue Jan 18, 2017
…-tool:c958b313-8d10-41ea-bcfb-c06a650a5a77 to master

* commit '009f61a4eb591502963d300d27c7b6fe2a11a098':
  libsel4camkes: Remove camkes_dma_page_alloc and camkes_dma_page_free.
  Fix: remove references to deprecated functions.
@gridbugs gridbugs self-assigned this Jan 26, 2017
@gridbugs
Copy link
Contributor

I'm modifying the rpc-connector-common template fragment to sanity check this attribute. Addressing the greater issue of attributes not being type-checked will be more complicated, as it's up to the templates to use attributes however they wish. We could possibly force template code to specify type rules when accessing attribute values.

@agacek
Copy link
Author

agacek commented Jan 30, 2017

Thanks @stevebob, I'm happy even if we fix these things one template at a time.

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

2 participants