Skip to content

Use common Timestamp impl in Hermit (attempt 2)#154234

Open
stepancheg wants to merge 1 commit intorust-lang:mainfrom
stepancheg:hermit-timespec
Open

Use common Timestamp impl in Hermit (attempt 2)#154234
stepancheg wants to merge 1 commit intorust-lang:mainfrom
stepancheg:hermit-timespec

Conversation

@stepancheg
Copy link
Copy Markdown
Contributor

@stepancheg stepancheg commented Mar 23, 2026

The goal is to have less code to maintain, so to be able to make changes easier.

Previous attempt #148847 was asked to postpone because there was restructure of code, which is complete now.

r? joboet

@rustbot rustbot added O-hermit Operating System: Hermit O-unix Operating system: Unix-like S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 23, 2026
@stepancheg stepancheg force-pushed the hermit-timespec branch 2 times, most recently from 878bcf6 to a5006e0 Compare March 23, 2026 03:35
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 23, 2026

joboet is currently at their maximum review capacity.
They may take a while to respond.

@stepancheg stepancheg marked this pull request as ready for review March 23, 2026 03:40
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 23, 2026
@stepancheg
Copy link
Copy Markdown
Contributor Author

r? Mark-Simulacrum

@rustbot rustbot assigned Mark-Simulacrum and unassigned joboet Mar 23, 2026
@rust-bors

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 23, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Copy link
Copy Markdown
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with comment addressed

View changes since this review


fn clock_gettime(clock: hermit_abi::clockid_t) -> Timespec {
let mut t = hermit_abi::timespec { tv_sec: 0, tv_nsec: 0 };
let _ = unsafe { hermit_abi::clock_gettime(clock, &raw mut t) };
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we ignoring the error here? In unix/time.rs we panic if there's an error, probably should match that here?

                cvt(unsafe { clock_gettime64(clock, t.as_mut_ptr()) }).unwrap();

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 27, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-hermit Operating System: Hermit O-unix Operating system: Unix-like S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants