dev: Exit correctly in dist-gem5
authorMichael LeBeane <michael.lebeane@amd.com>
Wed, 14 Sep 2016 03:08:34 +0000 (23:08 -0400)
committerMichael LeBeane <michael.lebeane@amd.com>
Wed, 14 Sep 2016 03:08:34 +0000 (23:08 -0400)
commitfebab25957066cf9b470864b6bda38687918b36d
tree5b848413e9092c8c1c7a422b70e9228038e975db
parentcc58148fe11fd9f579cf7b918472552897c809fb
dev: Exit correctly in dist-gem5
The receiver thread in dist_iface is allowed to directly exit the simulation.
This can cause exit to be called twice if the main thread simultaneously wants
to exit the simulation.  Therefore, have the receiver thread enqueue a request
to exit on the primary event queue for the main simulation thread to handle.
src/dev/net/dist_iface.cc
src/dev/net/tcp_iface.cc