Skip to content

native: Remove timerfd implementation on linux #13455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/libnative/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ pub mod file;
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "android")]
#[path = "timer_other.rs"]
pub mod timer;

#[cfg(target_os = "linux")]
#[path = "timer_timerfd.rs"]
#[path = "timer_unix.rs"]
pub mod timer;

#[cfg(target_os = "win32")]
Expand Down
327 changes: 0 additions & 327 deletions src/libnative/io/timer_timerfd.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,20 @@ mod imp {

#[cfg(target_os = "android")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "linux")]
mod imp {
use libc;
use std::uint;

pub static FD_SETSIZE: uint = 1024;

pub struct fd_set {
fds_bits: [u64, ..(FD_SETSIZE / 64)]
fds_bits: [uint, ..(FD_SETSIZE / uint::BITS)]
}

pub fn fd_set(set: &mut fd_set, fd: i32) {
set.fds_bits[(fd / 64) as uint] |= (1 << (fd % 64)) as u64;
let fd = fd as uint;
set.fds_bits[fd / uint::BITS] |= 1 << (fd % uint::BITS);
}

extern {
Expand Down