libfringe/benches/kernel_swap.rs
2015-02-02 14:17:23 -05:00

16 lines
253 B
Rust

#![feature(asm, test)]
extern crate test;
use test::Bencher;
#[bench]
fn kernel_swap(b: &mut Bencher) {
b.iter(|| unsafe {
asm!("movq $$102, %rax\n\
syscall"
:
:
: "rax", "rcx"
: "volatile");
});
}