Skip to content

Commit

Permalink
Fix build error for BSD tap driver
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-henry committed Sep 17, 2024
1 parent 4920b68 commit d34481d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions osdep/BSDEthernetTap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,12 @@ void BSDEthernetTap::threadMain()
// constructing itself.
Thread::sleep(500);

bool pinning = _pinning;

for (unsigned int i = 0; i < _concurrency; ++i) {
_rxThreads.push_back(std::thread([this, i, _pinning] {
_rxThreads.push_back(std::thread([this, i, pinning] {

if (_pinning) {
if (pinning) {
int pinCore = i % _concurrency;
fprintf(stderr, "Pinning thread %d to core %d\n", i, pinCore);
pthread_t self = pthread_self();
Expand Down

0 comments on commit d34481d

Please sign in to comment.