mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-05-01 13:12:30 +02:00
affinity
This commit is contained in:
parent
2b1f950d4b
commit
ba48d4482e
2 changed files with 81 additions and 40 deletions
48
vanity.hpp
Normal file
48
vanity.hpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
#pragma once
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <stdlib.h>
|
||||
#include <openssl/rand.h>
|
||||
#include "Crypto.h"
|
||||
#include "Identity.h"
|
||||
#include "common/key.hpp"
|
||||
#include <thread>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
|
||||
|
||||
// MARCO
|
||||
#define INIT_CPUS(count_cpu){\
|
||||
cpu = CPU_ALLOC(count_cpu-1);\
|
||||
if (cpu == NULL) {\
|
||||
return 1;\
|
||||
}\
|
||||
std::cout << "Succefully CPU_ALLOC" << std::endl;\
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static std::mutex thread_mutex;
|
||||
static i2p::data::SigningKeyType type;
|
||||
static i2p::data::PrivateKeys keys;
|
||||
static bool finded=false;
|
||||
static size_t padding_size;
|
||||
static uint8_t * KeyBuf;
|
||||
static uint8_t * PaddingBuf;
|
||||
static unsigned long long hash;
|
||||
static cpu_set_t * cpu;
|
||||
|
||||
//Functions visible and don't need.
|
||||
|
||||
|
||||
/*
|
||||
it does not need, but maybe in future we are can create.
|
||||
namespace i2p{
|
||||
namespace tools{
|
||||
namespace vain{
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue