summaryrefslogtreecommitdiff
path: root/src/python/swig
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-08-03 18:19:55 -0700
committerNathan Binkert <nate@binkert.org>2008-08-03 18:19:55 -0700
commit50ef39af82413ef463609f24173b22af13fad268 (patch)
tree44fb10aeaf17c5055c2ae315f5bc52e25180a3d3 /src/python/swig
parentede89c2d541051c2ed647e2967712e10b3c0fab0 (diff)
downloadgem5-50ef39af82413ef463609f24173b22af13fad268.tar.xz
sockets: Add a function to disable all listening sockets.
When invoking several copies of m5 on the same machine at the same time, there can be a race for TCP ports for the terminal connections or remote gdb. Expose a function to disable those ports, and have the regression scripts disable them. There are some SimObjects that have no other function than to be used with ports (NativeTrace and EtherTap), so they will panic if the ports are disabled.
Diffstat (limited to 'src/python/swig')
-rw-r--r--src/python/swig/core.i3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/swig/core.i b/src/python/swig/core.i
index 53d992ac6..3d360c017 100644
--- a/src/python/swig/core.i
+++ b/src/python/swig/core.i
@@ -34,6 +34,7 @@
%{
#include "python/swig/pyobject.hh"
+#include "base/socket.hh"
#include "sim/core.hh"
#include "sim/host.hh"
#include "sim/startup.hh"
@@ -42,6 +43,7 @@ extern const char *compileDate;
std::vector<std::string> compileFlags();
extern const char *hgRev;
extern const char *hgDate;
+inline void disableAllListeners() { ListenSocket::disableAll(); }
%}
%include "stdint.i"
@@ -53,6 +55,7 @@ void setOutputDir(const std::string &dir);
void setOutputFile(const std::string &file);
void SimStartup();
void doExitCleanup();
+void disableAllListeners();
%immutable compileDate;
char *compileDate;