Home
last modified time | relevance | path

Searched full:guard (Results 1 – 25 of 1330) sorted by relevance

12345678910>>...54

/linux/rust/kernel/sync/
H A Dcondvar.rs8 use super::{lock::Backend, lock::Guard, LockClassKey};
59 /// let mut guard = e.value.lock();
60 /// while *guard != v {
61 /// e.value_changed.wait(&mut guard);
117 guard: &mut Guard<'_, T, B>, in wait_internal()
131 let ret = guard.do_unlocked(|| unsafe { bindings::schedule_timeout(timeout_in_jiffies) }); in wait_internal()
141 /// Atomically releases the given lock (whose ownership is proven by the guard) and puts the
145 pub fn wait<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) { in wait()
146 self.wait_internal(TASK_UNINTERRUPTIBLE, guard, MAX_SCHEDULE_TIMEOUT); in wait()
156 pub fn wait_interruptible<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) -> bool { in wait_interruptible()
[all …]
H A Dlock.rs3 //! Generic kernel lock and guard.
5 //! It contains a generic Rust lock and guard that allow for different backends (e.g., mutexes,
174 pub fn lock(&self) -> Guard<'_, T, B> { in lock()
179 unsafe { Guard::new(self, state) }
184 /// Returns a guard that can be used to access the data protected by the lock if successful.
188 pub fn try_lock(&self) -> Option<Guard<'_, T, B>> { in try_lock()
191 unsafe { B::try_lock(self.state.get()).map(|state| Guard::new(self, state)) }
195 /// A lock guard.
198 /// when a guard goes out of scope. It also provides a safe and convenient way to access the data struct
200 #[must_use = "the lock unlocks immediately when the guard i argument
204 _not_sendGuard global() argument
205 unsafe impl<T: Sync + ?Sized, B: Backend> Sync for Guard<'_, T, B> {} global() implementation
207 impl<'a, T: ?Sized, B: Backend> Guard<'a, T, B> { global() implementation
275 impl<T: ?Sized, B: Backend> core::ops::Deref for Guard<'_, T, B> { global() implementation
284 impl<T: ?Sized, B: Backend> core::ops::DerefMut for Guard<'_, T, B> global() implementation
294 impl<T: ?Sized, B: Backend> Drop for Guard<'_, T, B> { global() implementation
301 impl<'a, T: ?Sized, B: Backend> Guard<'a, T, B> { global() implementation
[all...]
H A Dsrcu.rs32 /// SRCU readers may sleep while holding the read-side guard.
35 /// If a read-side guard has been leaked, dropping an [`Srcu`] may never return.
66 /// Leaking the returned [`Guard`] leaves the SRCU read-side critical
69 pub fn read_lock(&self) -> Guard<'_> { in read_lock()
74 Guard { in read_lock()
112 // This should only happen if a guard was leaked with `mem::forget`, which is in drop()
120 // If this ever happens, that means the guard was leaked by mistake and the in drop()
143 /// Guard for an active SRCU read-side critical section on a particular [`Srcu`].
145 /// Leaking this guard with [`core::mem::forget`] leaves the SRCU read-side
152 pub struct Guard<'a> { struct
[all …]
/linux/tools/testing/selftests/mm/
H A Dguard-regions.c373 /* Establish a guard page at the end of the mapping. */ in TEST_F()
377 /* Check that both guard pages result in SIGSEGV. */ in TEST_F()
381 /* Remove the first guard page. */ in TEST_F()
387 /* Remove the last guard page. */ in TEST_F()
396 * these be faulted in, so this also tests that we can install guard in TEST_F()
401 /* Make sure they are all guard pages. */ in TEST_F()
415 /* Remove guard pages. */ in TEST_F()
426 * Now remove all guard pages, make sure we don't remove existing in TEST_F()
479 * Now mark the whole range as guard pages and make sure all VMAs are as in TEST_F()
593 /* We want guard markers at start/end of each VMA. */ in TEST_F()
[all …]
/linux/rust/kernel/
H A Dxarray.rs43 /// let mut guard = xa.lock();
45 /// assert_eq!(guard.get(0), None);
47 /// assert_eq!(guard.store(0, dead, GFP_KERNEL)?.as_deref(), None);
48 /// assert_eq!(guard.get(0).copied(), Some(0xdead));
50 /// *guard.get_mut(0).unwrap() = 0xffff;
51 /// assert_eq!(guard.get(0).copied(), Some(0xffff));
53 /// assert_eq!(guard.store(0, beef, GFP_KERNEL)?.as_deref().copied(), Some(0xffff));
54 /// assert_eq!(guard.get(0).copied(), Some(0xbeef));
56 /// guard.remove(0);
57 /// assert_eq!(guard
150 pub struct Guard<'a, T: ForeignOwnable> { global() struct
155 impl<T: ForeignOwnable> Drop for Guard<'_, T> { global() implementation
180 impl<'a, T: ForeignOwnable> Guard<'a, T> { global() implementation
[all...]
H A Drevocable.rs43 /// let guard = v.try_access()?;
44 /// Some(guard.a + guard.b)
65 /// let guard = rcu::read_lock();
66 /// let e = v.try_access_with_guard(&guard)?;
105 /// Returns a guard that gives access to the object otherwise; the object is guaranteed to in try_access()
106 /// remain accessible while the guard is alive. In such cases, callers are not allowed to sleep in try_access()
109 let guard = rcu::read_lock();
113 Some(RevocableGuard::new(self.data.get(), guard))
124 /// remain accessible while the rcu read side guard i in try_access_with_guard()
100 let guard = rcu::read_lock(); try_access() localVariable
[all...]
/linux/drivers/virt/coco/guest/
H A Dreport.c96 guard(rwsem_write)(&tsm_rwsem); in tsm_report_privlevel_store()
121 guard(rwsem_read)(&tsm_rwsem); in tsm_report_privlevel_floor_show()
138 guard(rwsem_write)(&tsm_rwsem); in tsm_report_service_provider_store()
162 guard(rwsem_write)(&tsm_rwsem); in tsm_report_service_guid_store()
188 guard(rwsem_write)(&tsm_rwsem); in tsm_report_service_manifest_version_store()
204 guard(rwsem_write)(&tsm_rwsem); in tsm_report_inblob_write()
220 guard(rwsem_read)(&tsm_rwsem); in tsm_report_generation_show()
227 guard(rwsem_read)(&tsm_rwsem); in tsm_report_provider_show()
267 guard(rwsem_read)(&tsm_rwsem); in read_cached_report()
295 guard(rwsem_write)(&tsm_rwsem); in tsm_report_read()
[all …]
/linux/drivers/char/tpm/
H A Dtpm_tis_i2c.c33 /* Default Guard Time of 250µs until interface capability register is read */
37 /* Guard Time of 250µs after I2C slave NACK */
41 /* Guard Time bit masks; SR is repeated start, RW is read then write, etc. */
277 * Guard Time:
282 * Before the Guard Time is read (or after the TPM failed to send an I2C NACK),
283 * a Guard Time of 250µs applies.
285 * Various flags in the same register indicate if a guard time is needed:
286 * - SR: <I2C read with repeated start> <guard time> <I2C read>
287 * - RR: <I2C read> <guard time> <I2C read>
288 * - RW: <I2C read> <guard time> <I2C write>
[all …]
/linux/include/rdma/
H A Dsignature.h33 * enum ib_t10_dif_bg_type - Signature T10-DIF block-guard types
45 * @bg_type: T10-DIF block guard type (CRC|CSUM)
47 * @bg: seed of guard computation.
48 * @app_tag: application tag of guard block
49 * @ref_tag: initial guard block reference tag.
103 * | GUARD | APPTAG | REFTAG |
/linux/Documentation/mm/
H A Dvmalloced-kernel-stacks.rst25 Virtually mapped kernel stacks with guard pages cause kernel stack
30 support for virtually mapped stacks with guard pages. This feature
53 - If the stack overflows into a guard page, something reasonable
64 with guard pages. This causes kernel stack overflows to be caught
123 Leading and trailing guard pages help detect stack overflows. When the stack
124 overflows into the guard pages, handlers have to be careful not to overflow
131 Testing VMAP allocation with guard pages
135 and trailing guard page? The following lkdtm tests can help detect any
/linux/drivers/net/wireless/morsemicro/mm81x/
H A Dmmrc.c134 * Fixed point conversion for 3.6 * 2^8 used for long guard symbol tx time
140 * Fixed point conversion for 4.0 * 2^8 used for short guard symbol tx time
251 hweight_long(caps->guard) * in rows_from_sta_caps()
263 u16 guard = hweight_long(tb->caps.guard); in rate_update_index() local
266 index = bit_index(tb->caps.guard, rate->guard) + in rate_update_index()
267 bit_index(tb->caps.bandwidth, rate->bw) * guard + in rate_update_index()
268 bit_index(tb->caps.spatial_streams, rate->ss) * guard * bw + in rate_update_index()
269 bit_index(tb->caps.rates, rate->rate) * bw * streams * guard; in rate_update_index()
286 u16 guard = hweight_long(tb->caps.guard); in get_rate_row() local
287 u16 total_caps = mcs * bw * streams * guard; in get_rate_row()
[all …]
/linux/sound/pci/ice1712/
H A Dpontis.c115 guard(mutex)(&ice->gpio_mutex); in wm_dac_vol_get()
130 guard(mutex)(&ice->gpio_mutex); in wm_dac_vol_put()
168 guard(mutex)(&ice->gpio_mutex); in wm_adc_vol_get()
183 guard(mutex)(&ice->gpio_mutex); in wm_adc_vol_put()
207 guard(mutex)(&ice->gpio_mutex); in wm_adc_mux_get()
219 guard(mutex)(&ice->gpio_mutex); in wm_adc_mux_put()
241 guard(mutex)(&ice->gpio_mutex); in wm_bypass_get()
252 guard(mutex)(&ice->gpio_mutex); in wm_bypass_put()
274 guard(mutex)(&ice->gpio_mutex); in wm_chswap_get()
285 guard(mutex)(&ice->gpio_mutex); in wm_chswap_put()
[all …]
/linux/arch/parisc/math-emu/
H A Dcnv_float.h88 #define Dbl_to_sgl_mantissa(srcA,srcB,dest,inexact,guard,sticky,odd) \ argument
90 guard = Dbit3p2(srcB); \
92 inexact = guard | sticky; \
95 #define Dbl_to_sgl_denormalized(srcA,srcB,exp,dest,inexact,guard,sticky,odd,tiny) \ argument
101 guard = inexact >> 31; \
124 if (guard && (sticky || odd)) { \
134 guard = odd; \
136 inexact |= guard; \
144 guard = inexact >> 31; \
157 guard = inexact >> 31; \
[all …]
/linux/drivers/gpu/drm/xe/
H A Dxe_gt_freq.c73 guard(xe_pm_runtime)(dev_to_xe(dev)); in act_freq_show()
88 guard(xe_pm_runtime)(dev_to_xe(dev)); in cur_freq_show()
114 guard(xe_pm_runtime)(dev_to_xe(dev)); in rpe_freq_show()
128 guard(xe_pm_runtime)(dev_to_xe(dev)); in rpa_freq_show()
153 guard(xe_pm_runtime)(dev_to_xe(dev)); in min_freq_show()
173 guard(xe_pm_runtime)(dev_to_xe(dev)); in min_freq_store()
190 guard(xe_pm_runtime)(dev_to_xe(dev)); in max_freq_show()
210 guard(xe_pm_runtime)(dev_to_xe(dev)); in max_freq_store()
238 guard(xe_pm_runtime)(dev_to_xe(dev)); in power_profile_store()
/linux/rust/kernel/sync/lock/
H A Dglobal.rs9 sync::lock::{Backend, Guard, Lock},
97 /// A guard for a [`GlobalLock`].
100 #[must_use = "the lock unlocks immediately when the guard is unused"]
102 inner: Guard<'static, B::Item, B::Backend>,
165 // SAFETY: The lock is globally unique, so there can only be one guard.
173 // SAFETY: The lock is globally unique, so there can only be one guard.
204 /// let mut guard = MY_COUNTER.lock();
205 /// *guard += 1;
206 /// *guard
242 /// fn increment(&self, guard
[all...]
/linux/sound/core/seq/
H A Dseq_timer.c92 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_defaults()
123 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_reset()
174 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_tempo()
195 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_tempo_ppq()
218 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_position_tick()
232 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_position_time()
249 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_skew()
341 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_stop()
391 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_start()
414 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_continue()
[all …]
/linux/drivers/gpu/drm/i915/
H A Di915_vma_resource.h82 * @guard: The size of guard area preceding and trailing the bind.
129 u32 guard; member
194 * @guard: The size of the guard area preceding and trailing the bind.
214 u32 guard) in i915_vma_resource_init() argument
232 vma_res->guard = guard; in i915_vma_resource_init()
/linux/drivers/gpio/
H A Dgpiolib.c463 CLASS(gpio_chip_guard, guard)(desc); in gpiod_get_direction()
464 if (!guard.gc) in gpiod_get_direction()
478 ret = gpiochip_get_direction(guard.gc, offset); in gpiod_get_direction()
584 guard(srcu)(&gpio_devices_srcu); in gpio_name_to_desc()
588 guard(srcu)(&gdev->srcu); in gpio_name_to_desc()
1090 guard(srcu)(&gpio_devices_srcu); in gpiochip_setup_devs()
1094 guard(srcu)(&gdev->srcu); in gpiochip_setup_devs()
1487 guard(srcu)(&gpio_devices_srcu); in gpio_device_find()
1494 guard(srcu)(&gdev->srcu); in gpio_device_find()
2600 CLASS(gpio_chip_guard, guard)(desc); in gpiod_request_commit()
[all …]
/linux/drivers/thermal/
H A Dthermal_core.c145 guard(mutex)(&thermal_governor_lock); in thermal_zone_device_set_policy()
146 guard(thermal_zone)(tz); in thermal_zone_device_set_policy()
162 guard(mutex)(&thermal_governor_lock); in thermal_build_list_of_policies()
176 guard(mutex)(&thermal_governor_lock); in thermal_unregister_governors()
186 guard(mutex)(&thermal_governor_lock); in thermal_register_governors()
606 guard(thermal_zone)(tz); in thermal_zone_device_set_mode()
641 guard(thermal_zone)(tz); in thermal_zone_device_update()
652 guard(mutex)(&thermal_governor_lock); in for_each_thermal_governor()
670 guard(mutex)(&thermal_list_lock); in for_each_thermal_cooling_device()
688 guard(mutex)(&thermal_list_lock); in for_each_thermal_zone()
[all …]
/linux/Documentation/devicetree/bindings/display/
H A Datmel,lcdc-display.yaml28 - required: [ 'atmel,guard-time' ]
39 atmel,guard-time:
41 description: lcd guard time (Delay in frame periods)
74 - atmel,guard-time
86 atmel,guard-time = <9>;
/linux/arch/x86/include/asm/
H A Dcpu_entry_area.h35 /* The exception stacks' physical storage. No guard pages required */
40 /* The effective cpu entry area mapping with guard pages. */
95 * a read-only guard page. On 32-bit the GDT must be writeable, so
96 * it needs an extra guard page.
116 * Exception stacks used for IST entries with guard pages.
/linux/sound/aoa/codecs/
H A Donyx.c126 guard(mutex)(&onyx->mutex); in onyx_snd_vol_get()
149 guard(mutex)(&onyx->mutex); in onyx_snd_vol_put()
198 guard(mutex)(&onyx->mutex); in onyx_snd_inputgain_get()
216 guard(mutex)(&onyx->mutex); in onyx_snd_inputgain_put()
250 guard(mutex)(&onyx->mutex); in onyx_snd_capture_source_get()
262 guard(mutex)(&onyx->mutex); in onyx_set_capture_source()
308 guard(mutex)(&onyx->mutex); in onyx_snd_mute_get()
324 guard(mutex)(&onyx->mutex); in onyx_snd_mute_put()
365 guard(mutex)(&onyx->mutex); in onyx_snd_single_bit_get()
385 guard(mute in onyx_snd_single_bit_put()
[all...]
/linux/scripts/
H A Dsyscallnr.sh57 guard=_ASM_$(basename "$outfile" |
62 echo "#ifndef $guard"
63 echo "#define $guard"
73 echo "#endif /* $guard */"
/linux/drivers/input/serio/
H A Dserio.c42 guard(mutex)(&serio->drv_mutex); in serio_connect_driver()
49 guard(mutex)(&serio->drv_mutex); in serio_reconnect_driver()
59 guard(mutex)(&serio->drv_mutex); in serio_disconnect_driver()
146 guard(spinlock_irqsave)(&serio_event_lock); in serio_get_event()
168 guard(spinlock_irqsave)(&serio_event_lock); in serio_remove_duplicate_events()
190 guard(mutex)(&serio_mutex); in serio_handle_event()
230 guard(spinlock_irqsave)(&serio_event_lock); in serio_queue_event()
278 guard(spinlock_irqsave)(&serio_event_lock); in serio_remove_pending_events()
299 guard(spinlock_irqsave)(&serio_event_lock); in serio_get_pending_child()
502 guard(serio_pause_rx)(parent); in serio_add_port()
[all …]
/linux/sound/pci/lx6464es/
H A Dlx_core.c321 guard(mutex)(&chip->msg_lock); in lx_dsp_get_version()
337 guard(mutex)(&chip->msg_lock); in lx_dsp_get_clock_frequency()
381 guard(mutex)(&chip->msg_lock); in lx_dsp_set_granularity()
393 guard(mutex)(&chip->msg_lock); in lx_dsp_read_async_events()
418 guard(mutex)(&chip->msg_lock); in lx_pipe_allocate()
436 guard(mutex)(&chip->msg_lock); in lx_pipe_release()
458 guard(mutex)(&chip->msg_lock); in lx_buffer_ask()
499 guard(mutex)(&chip->msg_lock); in lx_pipe_stop()
511 guard(mutex)(&chip->msg_lock); in lx_pipe_toggle_state()
553 guard(mutex)(&chip->msg_lock); in lx_pipe_sample_count()
[all …]

12345678910>>...54