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

Supporting Function for Arm VM core pinning #122

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions camkes/templates/component.common.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@

/*? macros.show_includes(me.type.includes) ?*/

/*- if 'pcpus' in configuration[me.name].keys() -*/
/*- for c in configuration[me.name].get('pcpus') -*/
#if(/*? c ?*/ >= CONFIG_MAX_NUM_NODES)
#error "Invalid CPU number /*? c ?*/ in PCPU list of /*? me.name ?*/"
#endif
/*- endfor -*/
/*- endif -*/

static void (* _putchar)(int c);

void set_putchar(void (*putchar)(int c)) {
Expand Down Expand Up @@ -74,6 +82,14 @@ const char *get_instance_name(void) {
return name;
}

int get_instance_size_pcpus_list(void) {
/*- if 'pcpus' in configuration[me.name].keys() -*/
return /*? len(configuration[me.name].get('pcpus')) ?*/;
/*- else -*/
return 0;
/*- endif -*/
}

/*- set cnode_size = configuration[me.address_space].get('cnode_size_bits') -*/
/*- if cnode_size -*/
/*- if isinstance(cnode_size, six.string_types) -*/
Expand Down
1 change: 1 addition & 0 deletions camkes/templates/component.template.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/*- endfor -*/

const char *get_instance_name(void);
int get_instance_size_pcpus_list(void);

/* Attributes */

Expand Down