Home
last modified time | relevance | path

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

12345678910>>...50

/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...]
/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 marker 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.rs34 /// let guard = v.try_access()?;
35 /// Some(guard.a + guard.b)
56 /// let guard = rcu::read_lock();
57 /// let e = v.try_access_with_guard(&guard)?;
96 /// Returns a guard that gives access to the object otherwise; the object is guaranteed to
97 /// remain accessible while the guard is alive. In such cases, callers are not allowed to sleep
100 let guard = rcu::read_lock(); in try_access() localVariable
104 Some(RevocableGuard::new(self.data.get(), guard)) in try_access()
115 /// remain accessible while the rcu read side guard is alive. In such cases, callers are not
118 pub fn try_access_with_guard<'a>(&'a self, _guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
[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/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/sound/core/seq/
H A Dseq_timer.c81 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_defaults()
112 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_reset()
163 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_tempo()
184 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_tempo_ppq()
207 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_position_tick()
221 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_position_time()
238 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_skew()
330 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_stop()
381 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_start()
404 guard(spinlock_irqsav in snd_seq_timer_continue()
[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/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/thermal/
H A Dthermal_core.c145 guard(mutex)(&thermal_governor_lock); in thermal_register_governor()
146 guard(thermal_zone)(tz); in thermal_register_governor()
162 guard(mutex)(&thermal_governor_lock); in thermal_register_governor()
176 guard(mutex)(&thermal_governor_lock); in thermal_unregister_governor()
186 guard(mutex)(&thermal_governor_lock); in thermal_unregister_governor()
606 guard(thermal_zone)(tz); in thermal_zone_handle_trips()
641 guard(thermal_zone)(tz); in __thermal_zone_device_update()
652 guard(mutex)(&thermal_governor_lock); in __thermal_zone_device_update()
670 guard(mutex)(&thermal_list_lock); in thermal_zone_device_set_mode()
688 guard(mute in thermal_zone_device_enable()
[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/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);
588 guard(srcu)(&gdev->srcu); in gpiochip_set_desc_names()
1080 guard(srcu)(&gpio_devices_srcu);
1084 guard(srcu)(&gdev->srcu); in gpiochip_get_data()
1477 guard(srcu)(&gpio_devices_srcu);
1484 guard(srcu)(&gdev->srcu); in gpio_chip_match_by_fwnode()
2590 CLASS(gpio_chip_guard, guard)(des in gpiod_request_commit()
[all...]
/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...]
H A Dtas.c238 guard(mutex)(&tas->mtx); in tas_snd_vol_get()
256 guard(mutex)(&tas->mtx); in tas_snd_vol_put()
284 guard(mutex)(&tas->mtx); in tas_snd_mute_get()
295 guard(mutex)(&tas->mtx); in tas_snd_mute_put()
332 guard(mutex)(&tas->mtx); in tas_snd_mixer_get()
345 guard(mutex)(&tas->mtx); in tas_snd_mixer_put()
387 guard(mutex)(&tas->mtx); in tas_snd_drc_range_get()
401 guard(mutex)(&tas->mtx); in tas_snd_drc_range_put()
427 guard(mutex)(&tas->mtx); in tas_snd_drc_switch_get()
437 guard(mute in tas_snd_drc_switch_put()
[all...]
/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/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/scripts/
H A Dsyscallnr.sh57 guard=_ASM_$(basename "$outfile" |
62 echo "#ifndef $guard"
63 echo "#define $guard"
73 echo "#endif /* $guard */"
/linux/drivers/thermal/testing/
H A Dzone.c114 guard(tt_zone)(tt_zone); in tt_zone_tz_temp_get()
127 guard(tt_zone)(tt_zone); in tt_zone_tz_temp_set()
180 guard(mutex)(&tt_thermal_zones_lock); in tt_add_tz_work_fn()
228 guard(tt_zone)(tt_zone); in tt_zone_unregister_tz()
250 guard(mutex)(&tt_thermal_zones_lock); in tt_del_tz()
286 guard(mutex)(&tt_thermal_zones_lock); in tt_get_tt_zone()
300 guard(mutex)(&tt_thermal_zones_lock); in tt_put_tt_zone()
353 guard(tt_zone)(tt_zone); in tt_zone_add_trip()
388 guard(tt_zone)(tt_zone); in tt_zone_register_tz()
/linux/lib/crypto/tests/
H A Dsha3_kunit.c28 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-before guard */
33 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-after guard */
37 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-before guard */
42 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-after guard */
46 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-before guard */
53 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-after guard */
57 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-before guard */
66 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-after guard */
70 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-before guard */
73 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Write-after guard */
[all …]

12345678910>>...50