add ACSL annotation

This commit is contained in:
Yoichi Umezawa
2016-03-16 15:42:32 +09:00
parent 8dd9f5ef3f
commit 593cf98015
3 changed files with 54 additions and 2 deletions

View File

@@ -38,6 +38,11 @@ void init_processors_local(int max_id)
kprintf("locals = %p\n", locals);
}
/*@
@ requires \valid(id);
@ ensures \result == locals + (LOCALS_SPAN * id);
@ assigns \nothing;
@*/
struct x86_cpu_local_variables *get_x86_cpu_local_variable(int id)
{
return (struct x86_cpu_local_variables *)
@@ -98,6 +103,10 @@ void init_boot_processor_local(void)
}
/** IHK **/
/*@
@ ensures \result == %gs;
@ assigns \nothing;
*/
int ihk_mc_get_processor_id(void)
{
int id;
@@ -107,6 +116,10 @@ int ihk_mc_get_processor_id(void)
return id;
}
/*@
@ ensures \result == (locals + (LOCALS_SPAN * %gs))->apic_id;
@ assigns \nothing;
*/
int ihk_mc_get_hardware_processor_id(void)
{
struct x86_cpu_local_variables *v = get_x86_this_cpu_local();