Re-work of thread model
This commit is contained in:
@@ -36,29 +36,3 @@ index 74c22d33..58979e26 100644
|
||||
if (i < nqcb->oldQueues.size()) {
|
||||
if (nqcb->oldQueues[i]->byteLength > maxQueueLength) {
|
||||
maxQueueLength = nqcb->oldQueues[i]->byteLength;
|
||||
diff --git a/service/OneService.cpp b/service/OneService.cpp
|
||||
index a1c53764..e3034059 100644
|
||||
--- a/service/OneService.cpp
|
||||
+++ b/service/OneService.cpp
|
||||
@@ -625,6 +625,8 @@ public:
|
||||
break;
|
||||
if (!pkt)
|
||||
break;
|
||||
+ if (!_run)
|
||||
+ break;
|
||||
|
||||
const ZT_ResultCode rc = _node->processWirePacket(nullptr,pkt->now,pkt->sock,&(pkt->from),pkt->data,pkt->size,&_nextBackgroundTaskDeadline);
|
||||
{
|
||||
@@ -2244,6 +2246,12 @@ public:
|
||||
#endif
|
||||
syncManagedStuff(n,true,true);
|
||||
n.tap->setMtu(nwc->mtu);
|
||||
+#if defined(ZT_SDK)
|
||||
+ // Inform the virtual tap of the update
|
||||
+ if (op == ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE) {
|
||||
+ n.tap->lastConfigUpdate(OSUtils::now());
|
||||
+ }
|
||||
+#endif
|
||||
} else {
|
||||
_nets.erase(nwid);
|
||||
return -999; // tap init failed
|
||||
|
||||
61
ext/concurrentqueue/LICENSE.md
Normal file
61
ext/concurrentqueue/LICENSE.md
Normal file
@@ -0,0 +1,61 @@
|
||||
This license file applies to everything in this repository except that which
|
||||
is explicitly annotated as being written by other authors, i.e. the Boost
|
||||
queue (included in the benchmarks for comparison), Intel's TBB library (ditto),
|
||||
the CDSChecker tool (used for verification), the Relacy model checker (ditto),
|
||||
and Jeff Preshing's semaphore implementation (used in the blocking queue) which
|
||||
has a zlib license (embedded in blockingconcurrentqueue.h).
|
||||
|
||||
---
|
||||
|
||||
Simplified BSD License:
|
||||
|
||||
Copyright (c) 2013-2016, Cameron Desrochers.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice, this list of
|
||||
conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice, this list of
|
||||
conditions and the following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
---
|
||||
|
||||
I have also chosen to dual-license under the Boost Software License as an alternative to
|
||||
the Simplified BSD license above:
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
3635
ext/concurrentqueue/concurrentqueue.h
Normal file
3635
ext/concurrentqueue/concurrentqueue.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,32 +0,0 @@
|
||||
diff --git a/ports/unix/port/include/arch/cc.h b/ports/unix/port/include/arch/cc.h
|
||||
index 80b37d8..ae46d76 100644
|
||||
--- a/ports/unix/port/include/arch/cc.h
|
||||
+++ b/ports/unix/port/include/arch/cc.h
|
||||
@@ -32,6 +32,8 @@
|
||||
#ifndef LWIP_ARCH_CC_H
|
||||
#define LWIP_ARCH_CC_H
|
||||
|
||||
+#include "include/Debug.hpp" // libzt
|
||||
+
|
||||
/* see https://sourceforge.net/p/predef/wiki/OperatingSystems/ */
|
||||
#if defined __ANDROID__
|
||||
#define LWIP_UNIX_ANDROID
|
||||
@@ -65,7 +67,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(LWIP_UNIX_ANDROID) && defined(FD_SET)
|
||||
-typedef __kernel_fd_set fd_set;
|
||||
+//typedef __kernel_fd_set fd_set;
|
||||
#endif
|
||||
|
||||
#if defined(LWIP_UNIX_MACH)
|
||||
@@ -81,6 +83,9 @@ typedef struct sio_status_s sio_status_t;
|
||||
#define sio_fd_t sio_status_t*
|
||||
#define __sio_fd_t_defined
|
||||
|
||||
+// Comment out the following line to use lwIP's default diagnostic printing routine
|
||||
+#define LWIP_PLATFORM_DIAG(x) do {DEBUG_INFO x;} while(0)
|
||||
+
|
||||
typedef unsigned int sys_prot_t;
|
||||
|
||||
#endif /* LWIP_ARCH_CC_H */
|
||||
@@ -1,2 +0,0 @@
|
||||
// Refers to the actual lwIP stack driver location
|
||||
#include "../include/lwipopts.h"
|
||||
Reference in New Issue
Block a user