6. Line16 Type Flag

6.1. Typeflag Declaration

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

<<line16_typeflag>>=
static int line16_type = 0;

6.2. Setting the line16 type

<<line16_runtime_init>>=
line16_type = monolith_dict_newtype(monolith_dict_get(m));

6.3. Check if page is line16 type

A page is checked if it is of type "line16" via the funciton is_line16.

<<line16_function_declarations>>=
static int is_line16(monolith_page *pg);
<<line16_functions>>=
static int is_line16(monolith_page *pg)
{
    int type;
    type = monolith_page_type_get(pg);
    if(type == 0) return 0;
    return type == line16_type;
}



prev | home | next