Skip to content

Commit

Permalink
add missing function to get the latest error number
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Feb 28, 2024
1 parent 9fc053d commit cb94f6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hermit-abi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hermit-abi"
version = "0.3.8"
version = "0.3.9"
authors = ["Stefan Lankes"]
license = "MIT OR Apache-2.0"
edition = "2021"
Expand Down
4 changes: 4 additions & 0 deletions hermit-abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ pub const S_IFMT: u32 = 0xF000;

// sysmbols, which are part of the library operating system
extern "C" {
/// Get the last error number from the thread local storage
#[link_name = "sys_get_errno"]
pub fn get_errno() -> i32;

/// If the value at address matches the expected value, park the current thread until it is either
/// woken up with [`futex_wake`] (returns 0) or an optional timeout elapses (returns -ETIMEDOUT).
///
Expand Down

0 comments on commit cb94f6c

Please sign in to comment.