Skip to content
Snippets Groups Projects
Commit 1ca215cf authored by Edward Pierzchalski's avatar Edward Pierzchalski
Browse files

RISCV: make sure `i` has a uniform type.

The C parser produces abbreviations for local variables that depend on
the variable type and the order they appear in the source.

The signature for `get_avail_p_reg` on RISCV has a different type for
`i` than every other function, which causes issues when `hardware.h` is
included early in `kernel_all.c_pp`. Changing the type to `word_t`
avoids these issues.
parent 9e7379fc
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@
#ifndef __ASSEMBLER__
int get_num_avail_p_regs(void);
p_region_t get_avail_p_reg(unsigned int i);
p_region_t get_avail_p_reg(word_t i);
bool_t add_avail_p_reg(p_region_t reg);
void map_kernel_devices(void);
......
......@@ -51,7 +51,7 @@ BOOT_CODE int get_num_avail_p_regs(void)
return sizeof(avail_p_regs) / sizeof(p_region_t);
}
BOOT_CODE p_region_t get_avail_p_reg(unsigned int i)
BOOT_CODE p_region_t get_avail_p_reg(word_t i)
{
return avail_p_regs[i];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment