base,cpu,dev: Add a level of indirection for ListenSockets.

This makes room for there to be different implementations for different
types of sockets.

Change-Id: I8c959e2c3400caec8242e693e11330e072bc2c5f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69162
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Gabe Black
2023-03-18 08:59:51 -07:00
committed by Gabe Black
parent 7c614d225b
commit d03bc9d33c
11 changed files with 76 additions and 38 deletions

View File

@@ -39,14 +39,14 @@ namespace gem5
namespace trace {
NativeTrace::NativeTrace(const Params &p)
: ExeTracer(p), native_listener(p.name, 8000)
: ExeTracer(p), native_listener(listenSocketInetConfig(8000).build(p.name))
{
if (ListenSocket::allDisabled())
fatal("All listeners are disabled!");
native_listener.listen();
native_listener->listen();
fd = native_listener.accept();
fd = native_listener->accept();
}
void

View File

@@ -71,7 +71,7 @@ class NativeTrace : public ExeTracer
protected:
int fd;
ListenSocket native_listener;
ListenSocketPtr native_listener;
public: