mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-16 10:03:14 -07:00
CLI debugging, got rid of nasty old Thread class and replaced with newer cleaner portable idiom.
This commit is contained in:
parent
3368330b77
commit
a7c4cbe53a
17 changed files with 141 additions and 303 deletions
|
@ -187,7 +187,7 @@ EthernetTap::EthernetTap(
|
|||
|
||||
TRACE("tap %s created",_dev);
|
||||
|
||||
start();
|
||||
_thread = Thread<EthernetTap>::start(this);
|
||||
}
|
||||
#endif // __LINUX__
|
||||
|
||||
|
@ -271,14 +271,14 @@ EthernetTap::EthernetTap(
|
|||
|
||||
::pipe(_shutdownSignalPipe);
|
||||
|
||||
start();
|
||||
_thread = Thread<EthernetTap>::start(this);
|
||||
}
|
||||
#endif // __APPLE__
|
||||
|
||||
EthernetTap::~EthernetTap()
|
||||
{
|
||||
::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit
|
||||
join();
|
||||
Thread<EthernetTap>::join(_thread);
|
||||
::close(_fd);
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ bool EthernetTap::updateMulticastGroups(std::set<MulticastGroup> &groups)
|
|||
}
|
||||
#endif // __APPLE__
|
||||
|
||||
void EthernetTap::main()
|
||||
void EthernetTap::threadMain()
|
||||
throw()
|
||||
{
|
||||
fd_set readfds,nullfds;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue