5. Trig Type Flag
5.1. Typeflag Declaration
The typeflag for trig is stored as a global variable called trig_type
.
It initialized to be 0.
<<trig_typeflag>>=
static int trig_type = 0;
5.2. Setting the trig type
<<trig_runtime_init>>=
trig_type = monolith_dict_newtype(monolith_dict_get(m));
5.3. Check if page is trig type
A page is checked if it is of type "trig" via the funciton is_trig
.
<<trig_function_declarations>>=
static int is_trig(monolith_page *pg);
<<trig_functions>>=
static int is_trig(monolith_page *pg)
{
int type;
type = monolith_page_type_get(pg);
if(type == 0) return 0;
return type == trig_type;
}
prev | home | next