Lines Matching +full:inline +full:- +full:closed
1 // SPDX-License-Identifier: GPL-2.0
30 /// Signal-driven I/O is enabled.
33 /// Close-on-exec flag is set.
117 /// Instances of this type are reference-counted. The reference count is incremented by the
130 /// `fdput`. The idea behind light refcounts is that if the fd is not closed between the calls to
132 /// files_struct` holds a reference until the fd is closed. This means that it's safe to access the
135 /// The requirement that the fd is not closed during a light refcount applies globally across all
136 /// threads - not just on the thread using the light refcount. For this reason, light refcounts are
170 /// * The Rust borrow-checker normally ensures this by enforcing that the `ARef<File>` from which
177 /// files_struct` and create an `&File` from it. The "fd cannot be closed" rule is like the Rust
198 // SAFETY: The type invariants guarantee that `File` is always ref-counted. This implementation
201 #[inline]
207 #[inline]
218 /// To obtain a thread-safe [`File`], use the [`assume_no_fdget_pos`] conversion.
234 // SAFETY: The type invariants guarantee that `LocalFile` is always ref-counted. This implementation
237 #[inline]
243 #[inline]
261 #[inline]
262 pub fn fget(fd: u32) -> Result<ARef<LocalFile>, BadFdError> { in fget()
282 #[inline]
283 pub unsafe fn from_raw_file<'a>(ptr: *const bindings::file) -> &'a LocalFile { in from_raw_file()
305 #[inline]
306 pub unsafe fn assume_no_fdget_pos(me: ARef<LocalFile>) -> ARef<File> { in assume_no_fdget_pos()
316 #[inline]
317 pub fn as_ptr(&self) -> *mut bindings::file { in as_ptr()
322 pub fn cred(&self) -> &Credential { in cred()
336 #[inline]
337 pub fn flags(&self) -> u32 { in flags()
356 #[inline]
357 pub unsafe fn from_raw_file<'a>(ptr: *const bindings::file) -> &'a File { in from_raw_file()
369 #[inline]
370 fn deref(&self) -> &LocalFile { in deref()
404 #[inline]
405 pub fn get_unused_fd_flags(flags: u32) -> Result<Self> { in get_unused_fd_flags()
417 #[inline]
418 pub fn reserved_fd(&self) -> u32 { in reserved_fd()
426 #[inline]
434 // Additionally, the file is known to not have any non-shared `fdget_pos` calls, so even if in fd_install()
447 #[inline]
463 #[inline]
464 fn from(_: BadFdError) -> Error { in from()
470 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt()