syscall_emul.cc (11913:427ac0f00e57) | syscall_emul.cc (12716:430023c6881b) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 29 unchanged lines hidden (view full) --- 38#include <iostream> 39#include <string> 40 41#include "arch/utility.hh" 42#include "base/chunk_generator.hh" 43#include "base/trace.hh" 44#include "config/the_isa.hh" 45#include "cpu/thread_context.hh" | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 29 unchanged lines hidden (view full) --- 38#include <iostream> 39#include <string> 40 41#include "arch/utility.hh" 42#include "base/chunk_generator.hh" 43#include "base/trace.hh" 44#include "config/the_isa.hh" 45#include "cpu/thread_context.hh" |
46#include "dev/net/dist_iface.hh" |
|
46#include "mem/page_table.hh" 47#include "sim/process.hh" 48#include "sim/sim_exit.hh" 49#include "sim/syscall_debug_macros.hh" 50#include "sim/syscall_desc.hh" 51#include "sim/system.hh" 52 53using namespace std; --- 43 unchanged lines hidden (view full) --- 97 int status = p->getSyscallArg(tc, index); 98 99 System *sys = tc->getSystemPtr(); 100 101 int activeContexts = 0; 102 for (auto &system: sys->systemList) 103 activeContexts += system->numRunningContexts(); 104 if (activeContexts == 1) { | 47#include "mem/page_table.hh" 48#include "sim/process.hh" 49#include "sim/sim_exit.hh" 50#include "sim/syscall_debug_macros.hh" 51#include "sim/syscall_desc.hh" 52#include "sim/system.hh" 53 54using namespace std; --- 43 unchanged lines hidden (view full) --- 98 int status = p->getSyscallArg(tc, index); 99 100 System *sys = tc->getSystemPtr(); 101 102 int activeContexts = 0; 103 for (auto &system: sys->systemList) 104 activeContexts += system->numRunningContexts(); 105 if (activeContexts == 1) { |
106 /** 107 * Even though we are terminating the final thread context, dist-gem5 108 * requires the simulation to remain active and provide 109 * synchronization messages to the switch process. So we just halt 110 * the last thread context and return. The simulation will be 111 * terminated by dist-gem5 in a coordinated manner once all nodes 112 * have signaled their readiness to exit. For non dist-gem5 113 * simulations, readyToExit() always returns true. 114 */ 115 if (!DistIface::readyToExit(0)) { 116 tc->halt(); 117 return status; 118 } 119 |
|
105 exitSimLoop("exiting with last active thread context", status & 0xff); 106 return status; 107 } 108 109 if (group) 110 *p->exitGroup = true; 111 112 if (p->childClearTID) --- 941 unchanged lines hidden --- | 120 exitSimLoop("exiting with last active thread context", status & 0xff); 121 return status; 122 } 123 124 if (group) 125 *p->exitGroup = true; 126 127 if (p->childClearTID) --- 941 unchanged lines hidden --- |