Lines Matching +full:async +full:- +full:io
1 //! Low-level implementation details for libc-like runtime libraries such as
4 //! These functions are for implementing thread-local storage (TLS), managing
5 //! threads, loaded libraries, and other process-wide resources. Most of
29 use crate::io;
41 pub unsafe fn set_thread_area(u_info: &mut UserDesc) -> io::Result<()> { in set_thread_area()
48 pub unsafe fn arm_set_tls(data: *mut c_void) -> io::Result<()> { in arm_set_tls()
61 pub unsafe fn set_tid_address(data: *mut c_void) -> Pid { in set_tid_address()
68 /// - [Linux]: https://man7.org/linux/man-pages/man2/prctl.2.html
72 /// This is a very low-level feature for implementing threading libraries.
75 /// [Linux]: https://man7.org/linux/man-pages/man2/prctl.2.html
78 pub unsafe fn set_thread_name(name: &CStr) -> io::Result<()> { in set_thread_name()
90 /// This is a very low-level feature for implementing threading libraries.
93 pub unsafe fn exit_thread(status: i32) -> ! { in exit_thread()
106 /// - [POSIX `_Exit`]
107 /// - [Linux `exit_group`]
108 /// - [Linux `_Exit`]
111 /// [Linux `exit_group`]: https://man7.org/linux/man-pages/man2/exit_group.2.html
112 /// [Linux `_Exit`]: https://man7.org/linux/man-pages/man2/exit.2.html
116 pub fn exit_group(status: i32) -> ! { in exit_group()
124 pub fn startup_tls_info() -> StartupTlsInfo { in startup_tls_info()
132 /// - [Linux]
134 /// [Linux]: https://man7.org/linux/man-pages/man3/getauxval.3.html
138 pub fn exe_phdrs() -> (*const c_void, usize) { in exe_phdrs()
156 /// - Acquiring any other locks that are held in other threads on the parent
161 /// - Performing any dynamic allocation using the global allocator, since
166 /// - Accessing any external state which the parent assumes it has exclusive
170 /// - Accessing any random-number-generator state inherited from the parent,
174 /// - Accessing any thread runtime state, since this function does not update
178 /// - Accessing any memory shared with the parent, such as a [`MAP_SHARED`]
182 /// - Calling any C function which isn't known to be [async-signal-safe], as
192 /// guaranteed to be async-signal-safe.
195 /// - [POSIX]
196 /// - [Linux]
214 /// - "Rules", by Karla Kuskin
217 /// [not considered unsafe]: https://doc.rust-lang.org/reference/behavior-not-considered-unsafe.htm…
218 /// [`memfd_create`]: https://man7.org/linux/man-pages/man2/memfd_create.2.html
220 /// [Linux]: https://man7.org/linux/man-pages/man2/fork.2.html
221 /// [async-signal-safe]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#…
223 pub unsafe fn fork() -> io::Result<Option<Pid>> { in fork()
232 /// The `argv` and `envp` pointers must point to NUL-terminated arrays, and
233 /// their contents must be pointers to NUL-terminated byte arrays.
236 /// - [Linux]
238 /// [Linux]: https://man7.org/linux/man-pages/man2/execveat.2.html
249 ) -> io::Errno { in execveat()
258 /// The `argv` and `envp` pointers must point to NUL-terminated arrays, and
259 /// their contents must be pointers to NUL-terminated byte arrays.
262 /// - [Linux]
264 /// [Linux]: https://man7.org/linux/man-pages/man2/execve.2.html
267 pub unsafe fn execve(path: &CStr, argv: *const *const u8, envp: *const *const u8) -> io::Errno { in execve()