handle(fd, Simcall.enum, simcalls, simcalls_dict)
- fd.write(' NUM_SIMCALLS\n')
fd.write('};\n')
+ fd.write('\n')
+ fd.write('constexpr int NUM_SIMCALLS = ' + str(1 + len(simcalls)) + ';\n');
fd.close()
#
fd = header("popping_generated.cpp")
fd.write('#include "smx_private.hpp"\n')
+ fd.write('#include <simgrid/host.h>\n')
fd.write('#include <xbt/base.h>\n')
fd.write('#if SIMGRID_HAVE_MC\n')
fd.write('#include "src/mc/mc_forward.hpp"\n')
handle(fd, Simcall.case, simcalls, simcalls_dict)
- fd.write(' case NUM_SIMCALLS:\n')
- fd.write(' break;\n')
fd.write(' case SIMCALL_NONE:\n')
fd.write(' throw std::invalid_argument(simgrid::xbt::string_printf("Asked to do the noop syscall on %s@%s",\n')
fd.write(' get_cname(),\n')