Home
last modified time | relevance | path

Searched +full:reference +full:- +full:sync (Results 1 – 25 of 615) sorted by relevance

12345678910>>...25

/linux/rust/kernel/sync/
H A Daref.rs1 // SPDX-License-Identifier: GPL-2.0
3 //! Internal reference counting support.
5 //! Many C types already have their own reference counting mechanism (e.g. by storing a
6 //! `refcount_t`). This module provides support for directly using their internal reference count
7 //! from Rust; instead of making users have to use an additional Rust-reference count in the form of
12 //! implementation of the `get_` and `put_` pattern used in C for reference counting.
15 //! for accessing the internal reference coun
[all...]
H A Dlocked_by.rs1 // SPDX-License-Identifier: GPL-2.0
28 /// compile-time that access to `InnerFile` is only granted when an `InnerDirectory` is also
32 /// use kernel::sync::{LockedBy, Mutex};
71 /// fn new_file(ino: u32, dir: &Directory) -> File {
86 // SAFETY: If `T` is not `Sync`, then parallel shared access to this `LockedBy` allows you to use
90 // If `T` is `Sync`, then the `access` method also becomes available, which allows you to obtain
91 // several `&T` from several threads at once. However, this is okay as `T` is `Sync`.
92 unsafe impl<T: ?Sized + Send, U: ?Sized> Sync fo
125 access<'a>(&'a self, owner: &'a U) -> &'a T where T: Sync, access() argument
[all...]
H A Drefcount.rs1 // SPDX-License-Identifier: GPL-2.0
3 //! Atomic reference counting.
9 sync::atomic::Atomic,
13 /// Atomic reference counter.
27 /// The initial value should be non-saturated.
30 pub fn new(value: i32) -> Self { in new()
37 fn as_ptr(&self) -> *mut bindings::refcount_t { in as_ptr()
47 pub fn as_atomic(&self) -> in as_atomic()
[all...]
H A Dpoll.rs1 // SPDX-License-Identifier: GPL-2.0
11 sync::{
19 /// Creates a [`PollCondVar`] initialiser with the given name and a newly-created lock class.
23 $crate::sync::poll::PollCondVar::new(
33 /// The pointer must be null or reference a valid `poll_table`.
45 /// The pointer must be null or reference a valid `poll_table` for the duration of `'a`. in from_raw()
46 pub unsafe fn from_raw(table: *mut bindings::poll_table) -> Self { in from_raw()
71 /// [`CondVar`]: crate::sync
[all...]
H A Datomic.rs1 // SPDX-License-Identifier: GPL-2.0
13 //! - A normal write from C side is treated as an atomic write if
15 //! - Mixed-size atomic accesses don't cause data races.
17 //! [`LKMM`]: srctree/tools/memory-model/
40 /// [`Atomic::as_ptr()`], this provides a way to interact with [C-side atomic operations]
49 /// [LKMM]: srctree/tools/memory-model/
50 /// [C-sid
207 from_ptr<'a>(ptr: *mut T) -> &'a Self where T: Sync, from_ptr() argument
[all...]
/linux/include/drm/
H A Ddrm_syncobj.h29 #include <linux/dma-fence.h>
30 #include <linux/dma-fence-chain.h>
35 * struct drm_syncobj - sync object.
37 * This structure defines a generic sync object which wraps a &dma_fence.
41 * @refcount: Reference count of this object.
61 * @lock: Protects &cb_list and &ev_fd_list, and write-locks &fence.
73 * drm_syncobj_get - acquire a syncobj reference
74 * @obj: sync object
76 * This acquires an additional reference to @obj. It is illegal to call this
77 * without already holding a reference. No locks required.
[all …]
/linux/net/core/
H A Ddev_addr_lists.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * net/core/dev_addr_lists.c - Functions for handling net device lists
26 struct rb_node **ins_point = &list->tree.rb_node, *parent = NULL; in __hw_addr_insert()
33 diff = memcmp(new->addr, ha->addr, addr_len); in __hw_addr_insert()
35 diff = memcmp(&new->type, &ha->type, sizeof(new->type)); in __hw_addr_insert()
39 ins_point = &parent->rb_left; in __hw_addr_insert()
41 ins_point = &parent->rb_right; in __hw_addr_insert()
43 return -EEXIST; in __hw_addr_insert()
46 rb_link_node_rcu(&new->node, parent, ins_point); in __hw_addr_insert()
47 rb_insert_color(&new->node, &list->tree); in __hw_addr_insert()
[all …]
/linux/rust/kernel/debugfs/
H A Dfile_ops.rs1 // SPDX-License-Identifier: GPL-2.0
30 /// into a reference.
43 /// inode has a pointer to `T` in its private data that is safe to convert into a reference. in new()
44 const unsafe fn new(operations: bindings::file_operations, mode: u16) -> Self {
55 pub(crate) const fn mode(&self) -> u16 { in adapt()
61 pub(super) const fn adapt(&self) -> &FileOps<T::Inner> {
71 fn deref(&self) -> &Self::Target { in fmt()
79 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fm
[all...]
/linux/rust/kernel/
H A Dpid_namespace.rs1 // SPDX-License-Identifier: GPL-2.0
10 use crate::{bindings, sync::aref::AlwaysRefCounted, types::Opaque};
26 pub fn as_ptr(&self) -> *mut bindings::pid_namespace { in as_ptr()
30 /// Creates a reference to a [`PidNamespace`] from a valid pointer.
35 /// returned [`PidNamespace`] reference.
36 pub unsafe fn from_ptr<'a>(ptr: *const bindings::pid_namespace) -> &'a Self { in from_ptr()
43 // SAFETY: Instances of `PidNamespace` are always reference-counted.
47 // SAFETY: The existence of a shared reference means that the refcount is nonzero. in inc_ref()
53 // SAFETY: The safety requirements guarantee that the refcount is non-zero. in dec_ref()
59 // - `PidNamespace::dec_ref` can be called from any thread.
[all …]
H A Drbtree.rs1 // SPDX-License-Identifier: GPL-2.0
3 //! Red-black trees.
7 //! Reference: <https://docs.kernel.org/core-api/rbtree.html>
17 /// A red-black tree with owned nodes.
19 /// It is backed by the kernel C red-black trees.
101 /// use kernel::{alloc::flags, rbtree::{RBTree, RBTreeNode}, sync::SpinLock};
103 /// fn insert_test(tree: &SpinLock<RBTree<u32, u32>>) -> Resul
[all...]
H A Dopp.rs1 // SPDX-License-Identifier: GPL-2.0
9 //! Reference: <https://docs.kernel.org/power/opp.html>
19 sync::aref::{ARef, AlwaysRefCounted},
40 pub(crate) fn new(table: &Table) -> Result<Self> { in new()
55 /// Returns a reference to the underlying [`cpufreq::Table`].
57 fn table(&self) -> &cpufreq::Table { in table()
67 fn deref(&self) -> &Self::Target { in deref()
90 /// Creates a null-terminate
[all...]
H A Dmm.rs1 // SPDX-License-Identifier: GPL-2.0
16 sync::aref::{ARef, AlwaysRefCounted},
55 unsafe impl Sync for Mm {}
61 // SAFETY: The pointer is valid since self is a reference. in inc_ref()
74 /// This type is like [`Mm`], but with non-zero `mm_users`. It can only be used when `mm_users` can
75 /// be proven to be non-zero at compile-time, usually because the relevant code holds an `mmget`
82 /// Values of this type are always refcounted using `mmget`. The value of `mm_users` is non-zero.
91 unsafe impl Sync for MmWithUser {}
97 // SAFETY: The pointer is valid since self is a reference. in inc_ref()
113 fn deref(&self) -> &Mm { in deref()
[all …]
H A Ddevice.rs1 // SPDX-License-Identifier: GPL-2.0
11 sync::aref::ARef,
27 /// exist as temporary reference (see also [`Device::from_raw`]), which is only valid within a
28 /// certain scope or as [`ARef<Device>`], owning a dedicated reference count.
39 /// identifying information. Bus devices are visible in sysfs under `/sys/bus/<bus-name>/devices/`.
46 /// userspace via entries in `/sys/class/<class-name>/`.
54 /// reference is valid in. For instance, the [`Bound`] context guarantees that the [`Device`] is
55 /// bound to a driver for the entire duration of the existence of a [`Device<Bound>`] reference.
64 /// type for the corresponding scope the [`Device`] reference is created in.
67 /// [bus devices](#bus-devices) only.
[all …]
H A Dtask.rs1 // SPDX-License-Identifier: GPL-2.0
12 sync::aref::ARef,
75 /// Getting the current task and storing it in some struct. The reference count is automatically
79 /// use kernel::{task::Task, sync::aref::ARef};
87 /// fn new() -> Self {
107 unsafe impl Sync for Task {}
112 /// For example, to retrieve the pid-namespace of a task, you must use rcu protection unless it is
126 /// Other operations temporarily create a new sub-contex
[all...]
H A Drevocable.rs1 // SPDX-License-Identifier: GPL-2.0
12 sync::{
42 /// fn add_two(v: &Revocable<Example>) -> Option<u32> {
57 /// use kernel::sync::rcu;
64 /// fn add_two(v: &Revocable<Example>) -> Option<u32> {
87 // SAFETY: `Revocable` is `Sync` if the wrapped object is both `Send` and `Sync`. We require `Send` in new()
90 unsafe impl<T: Sync in new()
[all...]
/linux/Documentation/netlink/specs/
H A Ddpll.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2 ---
8 -
16 -
20 -
23 render-max: true
24 -
26 name: lock-status
31 -
37 -
[all …]
/linux/Documentation/sound/cards/
H A Dhdspm.rst2 Software Interface ALSA-DSP MADI Driver
5 (translated from German, so no good English ;-),
7 2004 - winfried ritsch
11 the Controls and startup-options are ALSA-Standard and only the
19 ------------------
21 * number of channels -- depends on transmission mode
29 * Single Speed -- 1..64 channels
37 * Double Speed -- 1..32 channels
40 Note: Choosing the 56-channel mode for
41 transmission/receive-mode , only 28 are transmitted/received
[all …]
/linux/drivers/gpu/drm/i915/gt/
H A Dintel_timeline_types.h1 /* SPDX-License-Identifier: MIT */
32 * lifetimes to the events for different use-cases. For example,
60 * Contains an RCU guarded pointer to the last request. No reference is
61 * held to the request, users must carefully acquire a reference to
75 * recent sync point. As the contexts may be executed out-of-order, we
81 struct i915_syncmap *sync; member
/linux/Documentation/driver-api/
H A Ddpll.rst1 .. SPDX-License-Identifier: GPL-2.0
10 PLL - Phase Locked Loop is an electronic circuit which syntonizes clock
14 DPLL - Digital Phase Locked Loop is an integrated circuit which in
81 - ``DPLL_PIN_STATE_CONNECTED`` - the pin is selected to drive dpll
83 - ``DPLL_PIN_STATE_DISCONNECTED`` - the pin is not selected to drive
89 - ``DPLL_PIN_STATE_SELECTABLE`` - the pin shall be considered as valid
91 - ``DPLL_PIN_STATE_DISCONNECTED`` - the pin shall be not considered as
97 for automatic-only DPLL devices where mode cannot be switched to manual.
105 - ``DPLL_PIN_OPERSTATE_ACTIVE`` - pin is qualified and actively used
107 - ``DPLL_PIN_OPERSTATE_STANDBY`` - pin is qualified but not actively
[all …]
H A Dsync_file.rst2 Sync File API Guide
8 sync_file API is, and how drivers can support it. Sync file is the carrier of
20 signals that the buffer is ready to use. And vice-versa for the consumer ->
23 Sync files allows userspace awareness on buffer sharing synchronization between
26 Sync file was originally added in the Android kernel but current Linux Desktop
29 in-fences and out-fences
30 ------------------------
32 Sync files can go either to or from userspace. When a sync_file is sent from
33 the driver to userspace we call the fences it contains 'out-fences'. They are
35 the driver creates an out-fence to be able to notify, through
[all …]
/linux/rust/kernel/drm/gem/
H A Dmod.rs1 // SPDX-License-Identifier: GPL-2.0 OR MIT
22 sync::aref::{
50 unsafe impl $( <$( $tparam_id ),+> )? $crate::sync::aref::AlwaysRefCounted for $type
56 // SAFETY: The existence of a shared reference guarantees that the refcount is
57 // non-zero.
65 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
88 pub trait DriverObject: Sync + Send + Sized { in new()
100 ) -> imp
[all...]
/linux/rust/syn/
H A Dspanned.rs1 // SPDX-License-Identifier: Apache-2.0 OR MIT
11 //! implements the [`Sync`] trait. Maybe this is the type of one of the fields
13 //! be able to pass a reference to one of those fields across threads.
16 //! [`Sync`]: std::marker::Sync
18 //! If the field type does *not* implement `Sync` as required, we want the
22 //! static assertion that `Sync` is implemented for that type.
36 //! pub fn my_macro(input: TokenStream) -> TokenStream {
41 //! struct _AssertSync where #ty: Sync;
48 //! # fn get_a_type() -> Type {
55 //! `Sync`. The errors they would see look like the following.
[all …]
/linux/drivers/dpll/zl3073x/
H A Ddpll.c1 // SPDX-License-Identifier: GPL-2.0-only
30 * struct zl3073x_dpll_pin - DPLL pin
34 * @tracker: tracking object for the acquired reference
40 * @esync_control: embedded sync is controllable
73 * zl3073x_dpll_is_input_pin - check if the pin is input one
81 return pin->dir == DPLL_PIN_DIRECTION_INPUT; in zl3073x_dpll_is_input_pin()
85 * zl3073x_dpll_is_nco_pin - check if the pin is a virtual NCO pin
93 return pin->id == ZL3073X_NCO_PIN_ID; in zl3073x_dpll_is_nco_pin()
97 * zl3073x_dpll_is_p_pin - check if the pin is P-pin
100 * Return: true if the pin is P-pin, false if it is N-pin
[all …]
/linux/drivers/net/ethernet/intel/ice/
H A Dice_dpll.c1 // SPDX-License-Identifier: GPL-2.0
58 * enum ice_dpll_pin_type - enumerate ice pin types:
64 * @ICE_DPLL_PIN_TYPE_TXCLK: transmit clock reference input pin
78 [ICE_DPLL_PIN_TYPE_RCLK_INPUT] = "rclk-input",
80 [ICE_DPLL_PIN_TYPE_TXCLK] = "txclk-input",
93 * ice_dpll_is_sw_pin - check if given pin shall be controlled by SW
98 * Check if the pin shall be controlled by SW - instead of providing raw access
99 * for pin control. For E810 NIC with dpll there is additional MUX-related logic
105 * * true - pin controlled by SW
106 * * false - pin not controlled by SW
[all …]
/linux/drivers/dpll/
H A Ddpll_core.h1 /* SPDX-License-Identifier: GPL-2.0 */
19 * struct dpll_device - stores DPLL device internal data
27 * @refcnt_tracker: ref_tracker directory for debugging reference leaks
43 * struct dpll_pin - structure for a dpll pin
49 * @fwnode: optional reference to firmware node
52 * @ref_sync_pins: hold references to pins for Reference SYNC feature
55 * @refcnt_tracker: ref_tracker directory for debugging reference leaks
75 * struct dpll_pin_ref - structure for referencing either dpll or pins

12345678910>>...25