[*] Linux build regressons
This commit is contained in:
parent
e60e308087
commit
e9651eead3
@ -545,6 +545,8 @@ namespace Aurora::Memory
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
bool ReadTagged(T &out);
|
bool ReadTagged(T &out);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
T ReadTagged();
|
||||||
//
|
//
|
||||||
|
|
||||||
inline AuUInt calcDifferenceBetweenHeadsUnsigned(AuUInt8 *pHeadPointer, AuUInt8 *pSubtrahend)
|
inline AuUInt calcDifferenceBetweenHeadsUnsigned(AuUInt8 *pHeadPointer, AuUInt8 *pSubtrahend)
|
||||||
|
@ -216,7 +216,7 @@ namespace Aurora::Memory
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto newLength = AuMax(length, AuPageRoundUp(this->allocSize + (this->allocSize / 3), 64ull));
|
auto newLength = AuMax(length, AuPageRoundUp(this->allocSize + (this->allocSize / 3), AuUInt(64)));
|
||||||
|
|
||||||
if (auto pNext = ZRealloc(this->base, newLength))
|
if (auto pNext = ZRealloc(this->base, newLength))
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,7 @@ namespace Aurora::Memory
|
|||||||
}
|
}
|
||||||
else if constexpr (AuIsTuple_v<AuRemoveReference_t<T>>)
|
else if constexpr (AuIsTuple_v<AuRemoveReference_t<T>>)
|
||||||
{
|
{
|
||||||
if (this->ReadTagged<AuUInt16> !=
|
if (this->ReadTagged<AuUInt16>() !=
|
||||||
AuTupleCountOf_v<AuRemoveReference_t<T>>)
|
AuTupleCountOf_v<AuRemoveReference_t<T>>)
|
||||||
{
|
{
|
||||||
this->flagReadError = true;
|
this->flagReadError = true;
|
||||||
@ -471,4 +471,23 @@ namespace Aurora::Memory
|
|||||||
|
|
||||||
return Read(out);
|
return Read(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
T ByteBuffer::ReadTagged()
|
||||||
|
{
|
||||||
|
T value {};
|
||||||
|
|
||||||
|
if (__detail::TypeToID<T>() != Read<AuUInt8>())
|
||||||
|
{
|
||||||
|
this->flagReadError = true;
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Read(value))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ namespace Aurora::Async
|
|||||||
|
|
||||||
AuThreads::TLSVariable<WorkerWPId_t> tlsWorkerId;
|
AuThreads::TLSVariable<WorkerWPId_t> tlsWorkerId;
|
||||||
|
|
||||||
AuSPtr<ThreadState> GetThreadHandle(WorkerId_t id);
|
AuSPtr<ThreadState> GetThreadHandle(WorkerId_t id) override;
|
||||||
private:
|
private:
|
||||||
// TODO: BarrierMultiple
|
// TODO: BarrierMultiple
|
||||||
bool Barrier(WorkerId_t, AuUInt32 ms, bool requireSignal, bool drop);
|
bool Barrier(WorkerId_t, AuUInt32 ms, bool requireSignal, bool drop);
|
||||||
|
@ -52,7 +52,7 @@ namespace Aurora::Async
|
|||||||
EWorkPrio GetPrio() override;
|
EWorkPrio GetPrio() override;
|
||||||
void SetPrio(EWorkPrio prio) override;
|
void SetPrio(EWorkPrio prio) override;
|
||||||
|
|
||||||
AuOptional<AuPair<AuUInt32, AuUInt32>> QueryFences();
|
AuOptional<AuPair<AuUInt32, AuUInt32>> QueryFences() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool CheckAlive();
|
bool CheckAlive();
|
||||||
|
@ -149,7 +149,7 @@ namespace Aurora::IO::IPC
|
|||||||
IPCPipeImpl::IPCPipeImpl(int (fds2)[2], int (fds3)[2], IPCToken readEnd, IPCToken writeEnd, AuSPtr<IPCEvent> event, AuSPtr<IPCMutex> mutex) :
|
IPCPipeImpl::IPCPipeImpl(int (fds2)[2], int (fds3)[2], IPCToken readEnd, IPCToken writeEnd, AuSPtr<IPCEvent> event, AuSPtr<IPCMutex> mutex) :
|
||||||
fds {fds2[0], fds2[1]}, secondary {fds3[0], fds3[1]},
|
fds {fds2[0], fds2[1]}, secondary {fds3[0], fds3[1]},
|
||||||
readEnd_(readEnd), writeEnd_(writeEnd), event_(event), mutex_(mutex),
|
readEnd_(readEnd), writeEnd_(writeEnd), event_(event), mutex_(mutex),
|
||||||
eventPreempt_(false, false, true,
|
eventPreempt_(false, false, true),
|
||||||
pipeReader_(this),
|
pipeReader_(this),
|
||||||
pipeWriter_(this)
|
pipeWriter_(this)
|
||||||
{
|
{
|
||||||
|
@ -400,8 +400,7 @@ namespace Aurora::IO::Net
|
|||||||
strncpy(ifr.ifr_name, adapter.device.c_str(), sizeof(ifr.ifr_name));
|
strncpy(ifr.ifr_name, adapter.device.c_str(), sizeof(ifr.ifr_name));
|
||||||
ifr.ifr_data = &edata;
|
ifr.ifr_data = &edata;
|
||||||
edata.cmd = ETHTOOL_GSET;
|
edata.cmd = ETHTOOL_GSET;
|
||||||
auto iRet = ::ioctl(sock, SIOCETHTOOL, &ifr);
|
if (::ioctl(iSocket, SIOCETHTOOL, &ifr) < 0)
|
||||||
if (iRet < 0)
|
|
||||||
{
|
{
|
||||||
::close(iSocket);
|
::close(iSocket);
|
||||||
return;
|
return;
|
||||||
@ -501,7 +500,6 @@ namespace Aurora::IO::Net
|
|||||||
case ARPHRD_IEEE80211_RADIOTAP:
|
case ARPHRD_IEEE80211_RADIOTAP:
|
||||||
case ARPHRD_IEEE802154:
|
case ARPHRD_IEEE802154:
|
||||||
case ARPHRD_IEEE802154_MONITOR:
|
case ARPHRD_IEEE802154_MONITOR:
|
||||||
define
|
|
||||||
adapter.eNetworkType = ENetworkAdapterType::eIEEE80211;
|
adapter.eNetworkType = ENetworkAdapterType::eIEEE80211;
|
||||||
break;
|
break;
|
||||||
case ARPHRD_PRONET:
|
case ARPHRD_PRONET:
|
||||||
@ -523,8 +521,8 @@ namespace Aurora::IO::Net
|
|||||||
auto attr = IFLA_RTA(ifa);
|
auto attr = IFLA_RTA(ifa);
|
||||||
auto attrlen = hdr->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa));
|
auto attrlen = hdr->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa));
|
||||||
|
|
||||||
for (; RTA_OK(attr, attrlen); attr = RTA_NEXT(attr, attrlen)) {
|
for (; RTA_OK(attr, attrlen); attr = RTA_NEXT(attr, attrlen))
|
||||||
|
{
|
||||||
size_t dstlen = RTA_PAYLOAD(attr);
|
size_t dstlen = RTA_PAYLOAD(attr);
|
||||||
|
|
||||||
if (attr->rta_type == IFLA_IFNAME)
|
if (attr->rta_type == IFLA_IFNAME)
|
||||||
@ -555,8 +553,8 @@ namespace Aurora::IO::Net
|
|||||||
adapter.uTransmitBytesPerSec = pStats64->tx_bytes;
|
adapter.uTransmitBytesPerSec = pStats64->tx_bytes;
|
||||||
adapter.uReceiveBytesPerSec = pStats64->rx_bytes;
|
adapter.uReceiveBytesPerSec = pStats64->rx_bytes;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,9 @@ namespace Aurora::IO::Net
|
|||||||
struct NetWorker *pWorker,
|
struct NetWorker *pWorker,
|
||||||
const AuSPtr<ISocketDriver> &pSocketDriver,
|
const AuSPtr<ISocketDriver> &pSocketDriver,
|
||||||
AuUInt osHandle,
|
AuUInt osHandle,
|
||||||
AuSPtr<ISocketServer> pParent) :
|
AuSPtr<ISocketServer> pParent,
|
||||||
SocketBase(pInterface, pWorker, pSocketDriver, osHandle, pParent)
|
SocketServer *pParent2) :
|
||||||
|
SocketBase(pInterface, pWorker, pSocketDriver, osHandle, pParent, pParent2)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -80,7 +81,7 @@ namespace Aurora::IO::Net
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->bHasRemoteMany_ && this->connectMany_.ips.size())
|
if (this->bHasRemoteMany_ && this->connectMany_.names.size())
|
||||||
{
|
{
|
||||||
if (this->connectMany_.names[0].byEndpoint)
|
if (this->connectMany_.names[0].byEndpoint)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ namespace Aurora::IO::Net
|
|||||||
|
|
||||||
AuSPtr<ISocketDriver> GetUserDriver() override;
|
AuSPtr<ISocketDriver> GetUserDriver() override;
|
||||||
|
|
||||||
AuSPtr<INetWorker> GetLockedWorkerThread();
|
AuSPtr<INetWorker> GetLockedWorkerThread() override;
|
||||||
|
|
||||||
const NetEndpoint &GetRemoteEndpoint() override;
|
const NetEndpoint &GetRemoteEndpoint() override;
|
||||||
const NetEndpoint &GetLocalEndpoint() override;
|
const NetEndpoint &GetLocalEndpoint() override;
|
||||||
|
@ -666,7 +666,7 @@ namespace Aurora::IO::Net
|
|||||||
pOutput->OnFailure((void *)nullptr);
|
pOutput->OnFailure((void *)nullptr);
|
||||||
if (this->pRetargetInput == pOutput)
|
if (this->pRetargetInput == pOutput)
|
||||||
{
|
{
|
||||||
this->pRetargetInput = {};
|
AuResetMember(this->pRetargetInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -684,7 +684,7 @@ namespace Aurora::IO::Net
|
|||||||
pInput->OnFailure((void *)nullptr);
|
pInput->OnFailure((void *)nullptr);
|
||||||
if (this->pRetargetOutput == pInput)
|
if (this->pRetargetOutput == pInput)
|
||||||
{
|
{
|
||||||
this->pRetargetOutput = {};
|
AuResetMember(this->pRetargetOutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -713,7 +713,7 @@ namespace Aurora::IO::Net
|
|||||||
pOutput->OnFailure((void *)nullptr);
|
pOutput->OnFailure((void *)nullptr);
|
||||||
if (this->pRetargetInput == pOutput)
|
if (this->pRetargetInput == pOutput)
|
||||||
{
|
{
|
||||||
this->pRetargetInput = {};
|
AuResetMember(this->pRetargetInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -749,7 +749,7 @@ namespace Aurora::IO::Net
|
|||||||
|
|
||||||
if (this->pRetargetOutput == pInput)
|
if (this->pRetargetOutput == pInput)
|
||||||
{
|
{
|
||||||
this->pRetargetOutput = {};
|
AuResetMember(this->pRetargetOutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,11 +105,11 @@ namespace Aurora::IO::Net
|
|||||||
|
|
||||||
AuOptional<AuUInt32> NetSocketServerLimits::GetAutoBanTimeSecs()
|
AuOptional<AuUInt32> NetSocketServerLimits::GetAutoBanTimeSecs()
|
||||||
{
|
{
|
||||||
return this->optAutoBanOnDDoSDetectA;
|
return this->optAutoBanTimeSecs;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuOptional<AuUInt32> NetSocketServerLimits::SetAutoBanTimeSecs(AuOptional<AuUInt32> optNextValue)
|
AuOptional<AuUInt32> NetSocketServerLimits::SetAutoBanTimeSecs(AuOptional<AuUInt32> optNextValue)
|
||||||
{
|
{
|
||||||
return AuExchange(this->optAutoBanOnDDoSDetectA, optNextValue);
|
return AuExchange(this->optAutoBanTimeSecs, optNextValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -639,7 +639,7 @@ namespace Aurora::Process
|
|||||||
|
|
||||||
auto ret = reinterpret_cast<AuMach>(pGetProcAddress(reinterpret_cast<HMODULE>(pHandle), symbol.c_str()));
|
auto ret = reinterpret_cast<AuMach>(pGetProcAddress(reinterpret_cast<HMODULE>(pHandle), symbol.c_str()));
|
||||||
#else
|
#else
|
||||||
auto ret = reinterpret_cast<AuMach>(dlsym(hapHandlendle, symbol.c_str()));
|
auto ret = reinterpret_cast<AuMach>(dlsym(pHandle, symbol.c_str()));
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
namespace Aurora::RNG
|
namespace Aurora::RNG
|
||||||
{
|
{
|
||||||
|
static const double kDblEpsilon = 2.2204460492503131e-16;
|
||||||
|
|
||||||
RandomDevice::RandomDevice()
|
RandomDevice::RandomDevice()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -282,7 +284,7 @@ namespace Aurora::RNG
|
|||||||
|
|
||||||
double RandomDevice::NextDecimal()
|
double RandomDevice::NextDecimal()
|
||||||
{
|
{
|
||||||
return this->UniformFloatInRange(DBL_EPSILON, 1.0);
|
return this->UniformFloatInRange(kDblEpsilon, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
AuUInt32 RandomDevice::NextIndex(AuUInt32 uCount /* = max + 1*/)
|
AuUInt32 RandomDevice::NextIndex(AuUInt32 uCount /* = max + 1*/)
|
||||||
@ -300,7 +302,7 @@ namespace Aurora::RNG
|
|||||||
double RandomDevice::NextNumber(double dMin, double dMax)
|
double RandomDevice::NextNumber(double dMin, double dMax)
|
||||||
{
|
{
|
||||||
auto dRange = dMax - dMin;
|
auto dRange = dMax - dMin;
|
||||||
return this->UniformFloatInRange(DBL_EPSILON, dRange + DBL_EPSILON) + dMin - DBL_EPSILON;
|
return this->UniformFloatInRange(kDblEpsilon, dRange + kDblEpsilon) + dMin - kDblEpsilon;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuMemoryViewRead RandomDevice::ToSeed()
|
AuMemoryViewRead RandomDevice::ToSeed()
|
||||||
|
Loading…
Reference in New Issue
Block a user