Lines Matching +full:field +full:- +full:active +full:- +full:even

1 // SPDX-License-Identifier: GPL-2.0
25 /// Signal-driven I/O is enabled.
28 /// Close-on-exec flag is set.
112 /// Instances of this type are reference-counted. The reference count is incremented by the
128 /// file even if `fdget` does not increment the refcount.
131 /// threads - not just on the thread using the light refcount. For this reason, light refcounts are
165 /// * The Rust borrow-checker normally ensures this by enforcing that the `ARef<File>` from which
177 /// * All instances of this type are refcounted using the `f_count` field.
178 /// * There must not be any active calls to `fdget_pos` on this file that did not take the
185 // SAFETY: This file is known to not have any active `fdget_pos` calls that did not take the
189 // SAFETY: This file is known to not have any active `fdget_pos` calls that did not take the
193 // SAFETY: The type invariants guarantee that `File` is always ref-counted. This implementation
213 /// To obtain a thread-safe [`File`], use the [`assume_no_fdget_pos`] conversion.
219 /// * All instances of this type are refcounted using the `f_count` field.
220 /// * If there is an active call to `fdget_pos` that did not take the `f_pos_lock` mutex, then it
229 // SAFETY: The type invariants guarantee that `LocalFile` is always ref-counted. This implementation
250 /// The file descriptor belongs to the current process, and there might be active local calls
257 pub fn fget(fd: u32) -> Result<ARef<LocalFile>, BadFdError> { in fget()
275 /// * The caller must ensure that if there is an active call to `fdget_pos` that did not take
278 pub unsafe fn from_raw_file<'a>(ptr: *const bindings::file) -> &'a LocalFile { in from_raw_file()
286 /// Assume that there are no active `fdget_pos` calls that prevent us from sharing this file.
299 /// There must not be any active `fdget_pos` calls on the current thread.
301 pub unsafe fn assume_no_fdget_pos(me: ARef<LocalFile>) -> ARef<File> { in assume_no_fdget_pos()
312 pub fn as_ptr(&self) -> *mut bindings::file { in as_ptr()
317 pub fn cred(&self) -> &Credential { in cred()
318 // SAFETY: It's okay to read the `f_cred` field without synchronization because `f_cred` is in cred()
332 pub fn flags(&self) -> u32 { in flags()
349 /// * The caller must ensure that if there are active `fdget_pos` calls on this file, then they
352 pub unsafe fn from_raw_file<'a>(ptr: *const bindings::file) -> &'a File { in from_raw_file()
365 fn deref(&self) -> &LocalFile { in deref()
400 pub fn get_unused_fd_flags(flags: u32) -> Result<Self> { in get_unused_fd_flags()
413 pub fn reserved_fd(&self) -> u32 { in reserved_fd()
429 // Additionally, the file is known to not have any non-shared `fdget_pos` calls, so even if in fd_install()
459 fn from(_: BadFdError) -> Error { in from()
465 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt()