Lines Matching +full:field +full:- +full:even +full:- +full:active
1 // SPDX-License-Identifier: GPL-2.0
23 /// Signal-driven I/O is enabled.
26 /// Close-on-exec flag is set.
110 /// Instances of this type are reference-counted. The reference count is incremented by the
126 /// file even if `fdget` does not increment the refcount.
129 /// threads - not just on the thread using the light refcount. For this reason, light refcounts are
163 /// * The Rust borrow-checker normally ensures this by enforcing that the `ARef<File>` from which
175 /// * All instances of this type are refcounted using the `f_count` field.
176 /// * There must not be any active calls to `fdget_pos` on this file that did not take the
183 // SAFETY: This file is known to not have any active `fdget_pos` calls that did not take the
187 // SAFETY: This file is known to not have any active `fdget_pos` calls that did not take the
191 // SAFETY: The type invariants guarantee that `File` is always ref-counted. This implementation
211 /// To obtain a thread-safe [`File`], use the [`assume_no_fdget_pos`] conversion.
217 /// * All instances of this type are refcounted using the `f_count` field.
218 /// * If there is an active call to `fdget_pos` that did not take the `f_pos_lock` mutex, then it
226 // SAFETY: The type invariants guarantee that `LocalFile` is always ref-counted. This implementation
246 /// The file descriptor belongs to the current process, and there might be active local calls
253 pub fn fget(fd: u32) -> Result<ARef<LocalFile>, BadFdError> { in fget()
271 /// * The caller must ensure that if there is an active call to `fdget_pos` that did not take
274 pub unsafe fn from_raw_file<'a>(ptr: *const bindings::file) -> &'a LocalFile { in from_raw_file()
282 /// Assume that there are no active `fdget_pos` calls that prevent us from sharing this file.
295 /// There must not be any active `fdget_pos` calls on the current thread.
297 pub unsafe fn assume_no_fdget_pos(me: ARef<LocalFile>) -> ARef<File> { in assume_no_fdget_pos()
308 pub fn as_ptr(&self) -> *mut bindings::file { in as_ptr()
313 pub fn cred(&self) -> &Credential { in cred()
314 // SAFETY: It's okay to read the `f_cred` field without synchronization because `f_cred` is in cred()
328 pub fn flags(&self) -> u32 { in flags()
345 /// * The caller must ensure that if there are active `fdget_pos` calls on this file, then they
348 pub unsafe fn from_raw_file<'a>(ptr: *const bindings::file) -> &'a File { in from_raw_file()
361 fn deref(&self) -> &LocalFile { in deref()
395 pub fn get_unused_fd_flags(flags: u32) -> Result<Self> { in get_unused_fd_flags()
408 pub fn reserved_fd(&self) -> u32 { in reserved_fd()
423 // Additionally, the file is known to not have any non-shared `fdget_pos` calls, so even if in fd_install()
452 fn from(_: BadFdError) -> Error { in from()
458 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt()