Skip to content

Commit 9b82b9f

Browse files
committed
More comments.
1 parent 938ac38 commit 9b82b9f

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

c-scape/src/jmp.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
//! Setjmp and longjmp.
2+
//!
3+
//! It's not possible to call these functions from Rust code, because Rust
4+
//! lacks a "returns twice" attribute, which would be needed to describe the
5+
//! behavior of `setjmp` and `sigsetjmp`. However, it may be possible to
6+
//! call them from C code that links to c-scape via its C ABI. All of the
7+
//! magic is hidden in inside `naked_asm` blocks.
8+
19
use core::arch::naked_asm;
210
use core::mem::size_of;
311
use libc::{c_int, c_void};

c-scape/src/nss.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Most of the nss functions are implement in c-gull rather than c-scape.
22
//! But we provide a `getpwuid_r` stub definition here in no-std mode because
33
//! it's referenced by libstd. libstd doesn't use it for anything other than
4-
//! a fallback for when the HOME environment variable is unsed, and HOME is
4+
//! a fallback for when the HOME environment variable is unset, and HOME is
55
//! set in any reasonable use case where this would be called, so a stub
66
//! suffices.
77

c-scape/src/todo/set_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//!
44
//! This would typically entail taking a lock that prevents thread creation,
55
//! setting the IDs for each thread manually by sending signals to them and
6-
//! having signal handlers that perform the set operation, waitinig for all
6+
//! having signal handlers that perform the set operation, waiting for all
77
//! the handlers to run, and then releasing the lock.
88
99
#[no_mangle]

0 commit comments

Comments
 (0)