Remove unused functions
Found with -Wunused-function flag.
This commit is contained in:
parent
38c6681349
commit
a55f06e082
|
@ -38,53 +38,6 @@
|
|||
#include "generated-constants.cpp"
|
||||
#pragma GCC target("sse4.2")
|
||||
|
||||
static uint32_t append_trivial(uint32_t crc, const uint8_t * input, size_t length)
|
||||
{
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
{
|
||||
crc = crc ^ input[i];
|
||||
for (int j = 0; j < 8; j++)
|
||||
crc = (crc >> 1) ^ 0x80000000 ^ ((~crc & 1) * POLY);
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
/* Table-driven software version as a fall-back. This is about 15 times slower
|
||||
than using the hardware instructions. This assumes little-endian integers,
|
||||
as is the case on Intel processors that the assembler code here is for. */
|
||||
static uint32_t append_adler_table(uint32_t crci, const uint8_t * input, size_t length)
|
||||
{
|
||||
const uint8_t * next = input;
|
||||
uint64_t crc;
|
||||
|
||||
crc = crci ^ 0xffffffff;
|
||||
while (length && ((uintptr_t)next & 7) != 0)
|
||||
{
|
||||
crc = table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);
|
||||
--length;
|
||||
}
|
||||
while (length >= 8)
|
||||
{
|
||||
crc ^= *(uint64_t *)next;
|
||||
crc = table[7][crc & 0xff]
|
||||
^ table[6][(crc >> 8) & 0xff]
|
||||
^ table[5][(crc >> 16) & 0xff]
|
||||
^ table[4][(crc >> 24) & 0xff]
|
||||
^ table[3][(crc >> 32) & 0xff]
|
||||
^ table[2][(crc >> 40) & 0xff]
|
||||
^ table[1][(crc >> 48) & 0xff]
|
||||
^ table[0][crc >> 56];
|
||||
next += 8;
|
||||
length -= 8;
|
||||
}
|
||||
while (length)
|
||||
{
|
||||
crc = table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);
|
||||
--length;
|
||||
}
|
||||
return (uint32_t)crc ^ 0xffffffff;
|
||||
}
|
||||
|
||||
/* Table-driven software version as a fall-back. This is about 15 times slower
|
||||
than using the hardware instructions. This assumes little-endian integers,
|
||||
as is the case on Intel processors that the assembler code here is for. */
|
||||
|
|
|
@ -1682,17 +1682,6 @@ void startNewSimulator() {
|
|||
g_simulator.connectionFailuresDisableDuration = g_random->random01() < 0.5 ? 0 : 1e6;
|
||||
}
|
||||
|
||||
static double networkLatency() {
|
||||
double a = g_random->random01();
|
||||
const double pFast = 0.999;
|
||||
if (a <= pFast)
|
||||
return FLOW_KNOBS->MIN_NETWORK_LATENCY + FLOW_KNOBS->FAST_NETWORK_LATENCY/pFast * a; // 0.5ms average
|
||||
else{
|
||||
a = (a-pFast) / (1-pFast); // uniform 0-1 again
|
||||
return FLOW_KNOBS->MIN_NETWORK_LATENCY + FLOW_KNOBS->SLOW_NETWORK_LATENCY*a; // long tail up to X ms
|
||||
}
|
||||
}
|
||||
|
||||
ACTOR void doReboot( ISimulator::ProcessInfo *p, ISimulator::KillType kt ) {
|
||||
TraceEvent("RebootingProcessAttempt").detailext("ZoneId", p->locality.zoneId()).detail("KillType", kt).detail("Process", p->toString()).detail("StartingClass", p->startingClass.toString()).detail("Failed", p->failed).detail("Excluded", p->excluded).detail("Cleared", p->cleared).detail("Rebooting", p->rebooting).detail("TaskDefaultDelay", TaskDefaultDelay);
|
||||
|
||||
|
|
|
@ -260,10 +260,6 @@ static Version decodeTagMessagesKey( StringRef key ) {
|
|||
return bigEndian64( BinaryReader::fromStringRef<Version>( stripTagMessagesKey(key), Unversioned() ) );
|
||||
}
|
||||
|
||||
static Version decodeTagMessageRefsKey( StringRef key ) {
|
||||
return bigEndian64( BinaryReader::fromStringRef<Version>( stripTagMessageRefsKey(key), Unversioned() ) );
|
||||
}
|
||||
|
||||
struct SpilledData {
|
||||
SpilledData() = default;
|
||||
SpilledData(Version version, IDiskQueue::location start, uint32_t length, uint32_t mutationBytes)
|
||||
|
|
|
@ -216,6 +216,7 @@ long long FastAllocator<Size>::getActiveThreads() {
|
|||
return globalData()->activeThreads;
|
||||
}
|
||||
|
||||
#if FAST_ALLOCATOR_DEBUG
|
||||
static int64_t getSizeCode(int i) {
|
||||
switch (i) {
|
||||
case 16: return 1;
|
||||
|
@ -231,6 +232,7 @@ static int64_t getSizeCode(int i) {
|
|||
default: return 11;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
template<int Size>
|
||||
void *FastAllocator<Size>::allocate() {
|
||||
|
|
|
@ -1101,30 +1101,6 @@ Future<T> tagError( Future<Void> future, Error e) {
|
|||
throw e;
|
||||
}
|
||||
|
||||
//If the future is ready, yields and returns. Otherwise, returns when future is set.
|
||||
template <class T>
|
||||
Future<T> orYield( Future<T> f ) {
|
||||
if(f.isReady()) {
|
||||
if(f.isError())
|
||||
return tagError<T>(yield(), f.getError());
|
||||
else
|
||||
return tag(yield(), f.get());
|
||||
}
|
||||
else
|
||||
return f;
|
||||
}
|
||||
|
||||
static Future<Void> orYield( Future<Void> f ) {
|
||||
if(f.isReady()) {
|
||||
if(f.isError())
|
||||
return tagError<Void>(yield(), f.getError());
|
||||
else
|
||||
return yield();
|
||||
}
|
||||
else
|
||||
return f;
|
||||
}
|
||||
|
||||
ACTOR template <class T> Future<T> chooseActor( Future<T> lhs, Future<T> rhs ) {
|
||||
choose {
|
||||
when ( T t = wait(lhs) ) { return t; }
|
||||
|
|
Loading…
Reference in New Issue