/* * Copyright (C) 2016 Red Hat, Inc. * Author: Michael S. Tsirkin <mst@redhat.com> * This work is licensed under the terms of the GNU GPL, version 2. * * Common macros and functions for ring benchmarking. */ #ifndef MAIN_H #define MAIN_H #include <stdbool.h> extern bool do_exit; #if defined(__x86_64__) || defined(__i386__) #include "x86intrin.h"
static inline void wait_cycles(unsigned long long cycles) { unsigned long long t; t = __rdtsc(); while (__rdtsc() - t < cycles) {} }Contributors
Person | Tokens | Prop | Commits | CommitProp | |
michael s. tsirkin | michael s. tsirkin | 32 | 100.00% | 1 | 100.00% |
Total | 32 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
michael s. tsirkin | michael s. tsirkin | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
michael s. tsirkin | michael s. tsirkin | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
michael s. tsirkin | michael s. tsirkin | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
michael s. tsirkin | michael s. tsirkin | 21 | 100.00% | 1 | 100.00% |
Total | 21 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
michael s. tsirkin | michael s. tsirkin | 322 | 100.00% | 1 | 100.00% |
Total | 322 | 100.00% | 1 | 100.00% |