> On Nov. 8, 2016, 4:56 p.m., Jason Lowe-Power wrote: > > src/sim/system.hh, line 543 > > <http://reviews.gem5.org/r/3681/diff/1/?file=63244#file63244line543> > > > > Can this just be an std::set<int>? This is only used to make sure there > > are no duplicates, right? > > Brandon Potter wrote: > Why is the std::set<int> preferred over std::array<bool>? > > Yes, it's used to figure out which PIDs are available and which have > already been claimed by other processes. > > Jason Lowe-Power wrote: > I think a std::set<int> is much more clear as to what it is tracking, and > it is simpler to access in many cases (e.g., it has a size() function). > > Plus, it's smaller. If you only have 1 PID (the most common case), then > you only have a single entry in the set, comparted to 32768... well, it could > be bits, but likely it's at least chars. I can't find any information as to > the implementation of std::array<bool>.
OK, I made it into a set. It'll require a change to the clone-exec patch as well, but I'll make that and post it now. - Brandon ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3681/#review9027 ----------------------------------------------------------- On Nov. 14, 2016, 7:48 p.m., Brandon Potter wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3681/ > ----------------------------------------------------------- > > (Updated Nov. 14, 2016, 7:48 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11721:831409e010d1 > --------------------------- > syscall_emul: [patch 14/22] adds identifier system calls > > This changeset add fields to the process object and adds the following > three system calls: setpgid, gettid, getpid. > > > Diffs > ----- > > src/arch/x86/linux/process.cc c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 > src/sim/Process.py c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 > src/sim/syscall_emul.cc c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 > src/sim/syscall_emul.hh c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 > src/sim/process.hh c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 > src/sim/process.cc c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 > src/sim/system.hh c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 > > Diff: http://reviews.gem5.org/r/3681/diff/ > > > Testing > ------- > > > Thanks, > > Brandon Potter > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
