5. Seq16 Type Flag

5.1. Typeflag Declaration

The typeflag for seq16 is stored as a global variable called seq16_type. It initialized to be 0.

<<seq16_typeflag>>=
static int seq16_type = 0;

5.2. Setting the seq16 type

<<seq16_runtime_init>>=
seq16_type = monolith_dict_newtype(monolith_dict_get(m));

5.3. Check if page is seq16 type

A page is checked if it is of type "seq16" via the funciton is_seq16.

<<seq16_function_declarations>>=
static int is_seq16(monolith_page *pg);
<<seq16_functions>>=
static int is_seq16(monolith_page *pg)
{
    int type;
    type = monolith_page_type_get(pg);
    if(type == 0) return 0;
    return type == seq16_type;
}



prev | home | next