Home
last modified time | relevance | path

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

12345678910>>...52

/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.c372 /* Establish a guard page at the end of the mapping. */ in TEST_F()
376 /* Check that both guard pages result in SIGSEGV. */ in TEST_F()
380 /* Remove the first guard page. */ in TEST_F()
386 /* Remove the last guard page. */ in TEST_F()
395 * these be faulted in, so this also tests that we can install guard in TEST_F()
400 /* Make sure they are all guard pages. */ in TEST_F()
414 /* Remove guard pages. */ in TEST_F()
425 * Now remove all guard pages, make sure we don't remove existing in TEST_F()
478 * Now mark the whole range as guard pages and make sure all VMAs are as in TEST_F()
592 /* We want guard markers at start/end of each VMA. */ in TEST_F()
[all …]
/linux/rust/kernel/
H A Dxarray.rs37 /// let mut guard = xa.lock();
39 /// assert_eq!(guard.get(0), None);
41 /// assert_eq!(guard.store(0, dead, GFP_KERNEL)?.as_deref(), None);
42 /// assert_eq!(guard.get(0).copied(), Some(0xdead));
44 /// *guard.get_mut(0).unwrap() = 0xffff;
45 /// assert_eq!(guard.get(0).copied(), Some(0xffff));
47 /// assert_eq!(guard.store(0, beef, GFP_KERNEL)?.as_deref().copied(), Some(0xffff));
48 /// assert_eq!(guard.get(0).copied(), Some(0xbeef));
50 /// guard.remove(0);
51 /// assert_eq!(guard.get(0), None);
[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/drivers/gpio/
H A Dgpiolib-sysfs.c149 guard(mutex)(&data->mutex); in direction_store()
193 guard(mutex)(&data->mutex); in value_store()
219 CLASS(gpio_chip_guard, guard)(desc); in gpio_sysfs_request_irq()
220 if (!guard.gc) in gpio_sysfs_request_irq()
247 ret = gpiochip_lock_as_irq(guard.gc, gpiod_hwgpio(desc)); in gpio_sysfs_request_irq()
261 gpiochip_unlock_as_irq(guard.gc, gpiod_hwgpio(desc)); in gpio_sysfs_request_irq()
277 CLASS(gpio_chip_guard, guard)(desc); in gpio_sysfs_free_irq()
278 if (!guard.gc) in gpio_sysfs_free_irq()
283 gpiochip_unlock_as_irq(guard.gc, gpiod_hwgpio(desc)); in gpio_sysfs_free_irq()
323 guard(mutex)(&data->mutex); in edge_store()
[all …]
H A Dgpiolib.c455 CLASS(gpio_chip_guard, guard)(desc); in gpiod_get_direction()
456 if (!guard.gc) in gpiod_get_direction()
470 ret = gpiochip_get_direction(guard.gc, offset); in gpiod_get_direction()
554 guard(srcu)(&gpio_devices_srcu); in gpio_name_to_desc()
558 guard(srcu)(&gdev->srcu); in gpio_name_to_desc()
949 guard(mutex)(&gpio_machine_hogs_mutex); in machine_gpiochip_add()
962 guard(srcu)(&gpio_devices_srcu); in gpiochip_setup_devs()
1356 guard(srcu)(&gpio_devices_srcu); in gpio_device_find()
1363 guard(srcu)(&gdev->srcu); in gpio_device_find()
2460 CLASS(gpio_chip_guard, guard)(desc); in gpiod_request_commit()
[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_irqsave)(&tmr->lock); 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},
96 /// A guard for a [`GlobalLock`].
100 inner: Guard<'static, B::Item, B::Backend>,
163 // SAFETY: The lock is globally unique, so there can only be one guard. in as_ref()
171 // SAFETY: The lock is globally unique, so there can only be one guard. in as_mut()
202 /// let mut guard = MY_COUNTER.lock();
203 /// *guard += 1;
204 /// *guard
240 /// fn increment(&self, guard: &mut GlobalGuard<MY_MUTEX>) -> u32 {
241 /// let my_counter = self.my_counter.as_mut(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.c126 guard(mutex)(&thermal_governor_lock); in thermal_register_governor()
142 guard(mutex)(&thermal_list_lock); in thermal_register_governor()
175 guard(mutex)(&thermal_governor_lock); in thermal_unregister_governor()
182 guard(mutex)(&thermal_list_lock); in thermal_unregister_governor()
197 guard(mutex)(&thermal_governor_lock); in thermal_zone_device_set_policy()
198 guard(thermal_zone)(tz); in thermal_zone_device_set_policy()
214 guard(mutex)(&thermal_governor_lock); in thermal_build_list_of_policies()
664 guard(thermal_zone)(tz); in thermal_zone_device_set_mode()
704 guard(thermal_zone)(tz); in thermal_zone_device_update()
716 guard(mutex)(&thermal_governor_lock); in for_each_thermal_governor()
[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/sound/aoa/codecs/
H A Donyx.c125 guard(mutex)(&onyx->mutex); in onyx_snd_vol_get()
148 guard(mutex)(&onyx->mutex); in onyx_snd_vol_put()
197 guard(mutex)(&onyx->mutex); in onyx_snd_inputgain_get()
215 guard(mutex)(&onyx->mutex); in onyx_snd_inputgain_put()
249 guard(mutex)(&onyx->mutex); in onyx_snd_capture_source_get()
261 guard(mutex)(&onyx->mutex); in onyx_set_capture_source()
307 guard(mutex)(&onyx->mutex); in onyx_snd_mute_get()
323 guard(mutex)(&onyx->mutex); in onyx_snd_mute_put()
364 guard(mutex)(&onyx->mutex); in onyx_snd_single_bit_get()
384 guard(mutex)(&onyx->mutex); 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(mutex)(&tas->mtx); 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()

12345678910>>...52