File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
19use core:: arch:: naked_asm;
210use core:: mem:: size_of;
311use libc:: { c_int, c_void} ;
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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]
You can’t perform that action at this time.
0 commit comments