self.name,
', '.join('%s %s' % (arg.rettype(), arg.name) for arg in self.args)))
res.append('{')
- res.append(' if (0) /* Go to that function to follow the code flow through the simcall barrier */')
+ res.append(' if (false) /* Go to that function to follow the code flow through the simcall barrier */')
if self.need_handler:
res.append(' simcall_HANDLER_%s(%s);' % (self.name,
', '.join(["&SIMIX_process_self()->simcall_"] + [arg.name for arg in self.args])))
fd.close()
#
- # popping_enum.h
+ # popping_enum.hpp
#
- fd = header("popping_enum.h")
+ fd = header("popping_enum.hpp")
fd.write('/**\n')
fd.write(' * @brief All possible simcalls.\n')
fd.write(' */\n')
- fd.write('typedef enum {\n')
+ fd.write('enum e_smx_simcall_t {\n')
fd.write(' SIMCALL_NONE,\n')
handle(fd, Simcall.enum, simcalls, simcalls_dict)
fd.write(' NUM_SIMCALLS\n')
- fd.write('} e_smx_simcall_t;\n')
+ fd.write('};\n')
fd.close()
#
fd.write(
'/** @brief Simcalls\' names (generated from src/simix/simcalls.in) */\n')
- fd.write('const char* simcall_names[] = {\n')
+ fd.write('constexpr std::array<const char*, NUM_SIMCALLS> simcall_names{{\n')
fd.write(' "SIMCALL_NONE",\n')
handle(fd, Simcall.string, simcalls, simcalls_dict)
- fd.write('};\n\n')
+ fd.write('}};\n\n')
fd.write('/** @private\n')
fd.write(