This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![feature(asm)] | |
| use std::io; | |
| fn cpuid(info: u32) -> (u32, u32, u32, u32) { | |
| let (mut a, mut b, mut c, mut d) = (0,0,0,0); | |
| unsafe { | |
| asm!("mov $4, %eax | |
| cpuid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern mod sync; | |
| // str op trait | |
| use std::str::StrSlice; | |
| // for tcp listen | |
| use std::io::{TcpListener, TcpStream}; | |
| use std::io::net::ip::SocketAddr; | |
| // for trait | |
| use std::io::{Listener, Writer, Acceptor, Buffer}; | |
| // for spawn |