Removed code which uses x86_only features to fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869621

This commit is contained in:
Pavel Odintsov 2017-07-25 19:53:15 +01:00
parent 176f4d2d1e
commit 7c615e9ae1
2 changed files with 0 additions and 26 deletions

@ -1008,29 +1008,6 @@ bool call_lua_function(std::string function_name, lua_State* lua_state_param, st
#endif
inline uint64_t read_tsc_cpu_register() {
union {
uint64_t tsc_64;
struct {
uint32_t lo_32;
uint32_t hi_32;
};
} tsc;
asm volatile("rdtsc" :
"=a" (tsc.lo_32),
"=d" (tsc.hi_32));
return tsc.tsc_64;
}
uint64_t get_tsc_freq_with_sleep() {
uint64_t start = read_tsc_cpu_register();
sleep(1);
return read_tsc_cpu_register() - start;
}
json_object* serialize_attack_description_to_json(attack_details& current_attack) {
json_object* jobj = json_object_new_object();

@ -104,9 +104,6 @@ subnet_t convert_subnet_from_string_to_binary(std::string subnet_cidr);
std::vector <std::string> split_strings_to_vector_by_comma(std::string raw_string);
subnet_t convert_subnet_from_string_to_binary_with_cidr_format(std::string subnet_cidr);
inline uint64_t read_tsc_cpu_register();
uint64_t get_tsc_freq_with_sleep();
#ifdef __linux__
bool manage_interface_promisc_mode(std::string interface_name, bool switch_on);
#endif