2 * Abstract machine interface.
3 * @author Christian Wuerdig
11 #include "bemachine.h"
13 /* We define a generic dummy unit */
14 be_execution_unit_t be_machine_execution_units_DUMMY[1];
16 be_execution_unit_type_t be_machine_execution_unit_types[] = {
17 { 1, 1, "DUMMY", be_machine_execution_units_DUMMY },
21 * Initialize generic dummy unit.
23 void be_machine_init_dummy_unit(void) {
24 be_machine_execution_units_DUMMY[0].name = "GENERIC_DUMMY_UNIT";
25 be_machine_execution_units_DUMMY[0].tp = &be_machine_execution_unit_types[0];
29 * Returns the generic dummy unit.
31 be_execution_unit_t *be_machine_get_dummy_unit(void) {
32 return &be_machine_execution_units_DUMMY[0];
36 * Check if given unit is the generic dummy unit.
38 int be_machine_is_dummy_unit(be_execution_unit_t *unit) {
39 return unit == &be_machine_execution_units_DUMMY[0];
43 * Check if given unit is the generic dummy unit type.
45 int be_machine_is_dummy_unit_type(be_execution_unit_type_t *tp) {
46 return tp == &be_machine_execution_unit_types[0];