diff --git a/run b/run index 1989e9f..cfaec32 100755 --- a/run +++ b/run @@ -479,6 +479,7 @@ Extra options to append at the end of the emulator command line. cmd.extend([ self.env['gem5_se_file'], LF, '--cmd', self.env['image'], LF, + '--num-cpus', str(self.env['cpus']), LF, # We have to use cpu[0] here because on multi-cpu workloads, # cpu[1] and higher use workload as a proxy to cpu[0].workload. # as can be seen from the config.ini. @@ -498,10 +499,10 @@ Extra options to append at the end of the emulator command line. extra_emulator_args.extend(['-r', str(cpt_dirs_sorted_by_tick.index(cpt_dir) + 1)]) cmd.extend([ self.env['gem5_fs_file'], LF, - '--num-cpus', str(self.env['cpus']), LF, '--disk-image', self.env['disk_image'], LF, '--kernel', self.env['image'], LF, '--mem-size', memory, LF, + '--num-cpus', str(self.env['cpus']), LF, '--script', self.env['gem5_readfile_file'], LF, ]) if self.env['arch'] == 'x86_64': @@ -565,11 +566,11 @@ Extra options to append at the end of the emulator command line. 'arm', 'fs_bigLITTLE.py' ), LF, - '--big-cpus', '2', LF, + '--big-cpus', str((self.env['cpus'] + 1) // 2), LF, '--cpu-type', cpu_type, LF, '--disk', self.env['disk_image'], LF, '--kernel', self.env['image'], LF, - '--little-cpus', '2', LF, + '--little-cpus', str(self.env['cpus'] // 2), LF, ]) if self.env['dtb']: cmd.extend([ diff --git a/userland/cpp/thread_return_value.cpp b/userland/cpp/thread_return_value.cpp index 988eac1..4f2249c 100644 --- a/userland/cpp/thread_return_value.cpp +++ b/userland/cpp/thread_return_value.cpp @@ -1,3 +1,5 @@ +// https://cirosantilli.com/linux-kernel-module-cheat#cpp-multithreading +// // http://stackoverflow.com/questions/7686939/c-simple-return-value-from-stdthread // http://stackoverflow.com/questions/28950835/c-error-no-type-named-type-in-class-stdresult-ofvoid-stdunordered // http://stackoverflow.com/questions/21048906/stdthread-pass-by-reference-calls-copy-constructor