Skip to content
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

native: Remove timerfd implementation on linux #13455

Merged
merged 1 commit into from
Apr 13, 2014

Conversation

alexcrichton
Copy link
Member

Rust advertises itself as being compatible with linux 2.6.18, but the timerfd
set of syscalls weren't added until linux 2.6.25. There is no real need for a
specialized timer implementation beyond being a "little more accurate", but the
select() implementation will suffice for now.

If it is later deemed that an accurate timerfd implementation is needed, it can
be added then through some method which will allow the standard distribution to
continue to be compatible with 2.6.18

Closes #13447

@thestinger
Copy link
Contributor

Is pselect portable enough to use it instead? It has nanosecond precision too.

@alexcrichton
Copy link
Member Author

It looks like it is indeed, the manpage says it was introduced in 2.6.16

@thestinger
Copy link
Contributor

I'm more curious if it can be used on OS X and FreeBSD though, since that would allow keeping a single implementation. IIRC, OS X is missing some POSIX 2001 stuff.

@alexcrichton
Copy link
Member Author

The OSX manpage states:

The pselect() function first appeared in FreeBSD 5.0

which means that we're fine on freebsd, and I imagine pretty good on OSX as well.

Rust advertises itself as being compatible with linux 2.6.18, but the timerfd
set of syscalls weren't added until linux 2.6.25. There is no real need for a
specialized timer implementation beyond being a "little more accurate", but the
select() implementation will suffice for now.

If it is later deemed that an accurate timerfd implementation is needed, it can
be added then through some method which will allow the standard distribution to
continue to be compatible with 2.6.18

Closes rust-lang#13447
bors added a commit that referenced this pull request Apr 13, 2014
Rust advertises itself as being compatible with linux 2.6.18, but the timerfd
set of syscalls weren't added until linux 2.6.25. There is no real need for a
specialized timer implementation beyond being a "little more accurate", but the
select() implementation will suffice for now.

If it is later deemed that an accurate timerfd implementation is needed, it can
be added then through some method which will allow the standard distribution to
continue to be compatible with 2.6.18

Closes #13447
@bors bors closed this Apr 13, 2014
@bors bors merged commit 28ba3a7 into rust-lang:master Apr 13, 2014
@alexcrichton alexcrichton deleted the jettison-timerfd branch April 13, 2014 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

timerfd is incompatible with common linux kernels
3 participants