Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 498) sorted by relevance

12345678910>>...20

/linux/rust/kernel/num/
H A Dbounded.rs39 fn fits_within<T: Integer>(value: T, num_bits: u32) -> bool { in fits_within() argument
40 fits_within!(value, T, num_bits) in fits_within()
230 pub struct Bounded<T: Integer, const N: u32>(T);
276 impl<T, const N: u32> Bounded<T, N>
278 T: Integer,
288 const unsafe fn __new(value: T) -> Self { in __new()
294 assert!(N <= T::BITS); in __new()
331 pub fn try_new(value: T) -> Option<Self> { in try_new()
370 pub fn from_expr(expr: T) -> Self { in from_expr()
390 pub fn get(self) -> T { in get() argument
[all …]
/linux/tools/debugging/
H A Dkernel-chktaint48 T=$taint
55 if [ `expr $T % 2` -eq 0 ]; then
62 T=`expr $T / 2`
63 if [ `expr $T % 2` -eq 0 ]; then
70 T=`expr $T / 2`
71 if [ `expr $T % 2` -eq 0 ]; then
78 T=`expr $T /
[all...]
/linux/drivers/net/wireguard/selftest/
H A Dcounter.c24 #define T(n, v) do { \ in wg_packet_counter_selftest() macro
34 /* 1 */ T(0, true); in wg_packet_counter_selftest()
35 /* 2 */ T(1, true); in wg_packet_counter_selftest()
36 /* 3 */ T(1, false); in wg_packet_counter_selftest()
37 /* 4 */ T(9, true); in wg_packet_counter_selftest()
38 /* 5 */ T(8, true); in wg_packet_counter_selftest()
39 /* 6 */ T(7, true); in wg_packet_counter_selftest()
40 /* 7 */ T(7, false); in wg_packet_counter_selftest()
41 /* 8 */ T(T_LIM, true); in wg_packet_counter_selftest()
42 /* 9 */ T(T_LIM - 1, true); in wg_packet_counter_selftest()
[all …]
/linux/rust/kernel/alloc/
H A Dkbox.rs81 pub struct Box<#[cfg_attr(CONFIG_RUSTC_HAS_COERCE_POINTEE, pointee)] T: ?Sized, A: Allocator>(
82 NonNull<T>,
89 impl<T, U, A> core::ops::CoerceUnsized<Box<U, A>> for Box<T, A>
91 T: ?Sized + core::marker::Unsize<U>,
100 impl<T, U, A> core::ops::DispatchFromDyn<Box<U, A>> for Box<T, A>
102 T: ?Sized + core::marker::Unsize<U>,
118 pub type KBox<T> = Box<T, super::allocator::Kmalloc>;
130 pub type VBox<T> = Box<T, super::allocator::Vmalloc>;
142 pub type KVBox<T> = Box<T, super::allocator::KVmalloc>;
146 unsafe impl<T, A: Allocator> ZeroableOption for Box<T, A> {}
[all …]
H A Dkvec.rs104 pub struct Vec<T, A: Allocator> {
105 ptr: NonNull<T>,
110 layout: ArrayLayout<T>,
126 pub type KVec<T> = Vec<T, Kmalloc>;
139 pub type VVec<T> = Vec<T, Vmalloc>;
152 pub type KVVec<T> = Vec<T, KVmalloc>;
155 unsafe impl<T, A> Send for Vec<T, A>
157 T: Send,
163 unsafe impl<T, A> Sync for Vec<T, A>
165 T: Sync,
[all …]
/linux/rust/syn/
H A Dpunctuated.rs49 pub struct Punctuated<T, P> {
50 inner: Vec<(T, P)>,
51 last: Option<Box<T>>,
54 impl<T, P> Punctuated<T, P> {
78 pub fn first(&self) -> Option<&T> { in first() argument
83 pub fn first_mut(&mut self) -> Option<&mut T> { in first_mut() argument
88 pub fn last(&self) -> Option<&T> { in last() argument
93 pub fn last_mut(&mut self) -> Option<&mut T> { in last_mut() argument
98 pub fn get(&self, index: usize) -> Option<&T> { in get() argument
109 pub fn get_mut(&mut self, index: usize) -> Option<&mut T> { in get_mut() argument
[all …]
H A Ddrops.rs10 pub(crate) struct NoDrop<T: ?Sized>(ManuallyDrop<T>);
12 impl<T> NoDrop<T> {
13 pub(crate) fn new(value: T) -> Self in new()
15 T: TrivialDrop, in new()
21 impl<T: ?Sized> Deref for NoDrop<T> {
22 type Target = T;
28 impl<T: ?Sized> DerefMut for NoDrop<T> {
36 impl<T> TrivialDrop for iter::Empty<T> {}
37 impl<T> TrivialDrop for slice::Iter<'_, T> {}
38 impl<T> TrivialDrop for slice::IterMut<'_, T> {}
[all …]
/linux/rust/pin-init/src/
H A Dlib.rs924 pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {
933 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E>; in __pinned_init()
953 fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E> in pin_chain() argument
955 F: FnOnce(Pin<&mut T>) -> Result<(), E>, in pin_chain()
962 pub struct ChainPinInit<I, F, T: ?Sized, E>(I, F, __internal::Invariant<(E, T)>);
968 unsafe impl<T: ?Sized, E, I, F> PinInit<T, E> for ChainPinInit<I, F, T, E>
970 I: PinInit<T, E>,
971 F: FnOnce(Pin<&mut T>) -> Result<(), E>,
973 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> { in __pinned_init()
1023 pub unsafe trait Init<T: ?Sized, E = Infallible>: PinInit<T, E> {
[all …]
H A D__internal.rs17 pub(crate) type Invariant<T> = PhantomData<fn(*mut T) -> *mut T>;
23 pub(crate) struct InitClosure<F, T: ?Sized, E>(pub(crate) F, pub(crate) Invariant<(E, T)>);
27 unsafe impl<T: ?Sized, F, E> Init<T, E> for InitClosure<F, T, E>
29 F: FnOnce(*mut T) -> Result<(), E>,
32 unsafe fn __init(self, slot: *mut T) -> Result<(), E> { in __init()
39 unsafe impl<T: ?Sized, F, E> PinInit<T, E> for InitClosure<F, T, E>
41 F: FnOnce(*mut T) -> Result<(), E>,
44 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> { in __pinned_init()
109 pub struct AllData<T: ?Sized>(Invariant<T>);
111 impl<T: ?Sized> Clone for AllData<T> {
[all …]
/linux/tools/perf/tests/
H A Dkmod-path.c44 #define T(path, an, k, c, n) \ macro
53 T("/xxxx/xxxx/x-x.ko", true , true, 0 , "[x_x]"); in test__kmod_path__parse()
54 T("/xxxx/xxxx/x-x.ko", false , true, 0 , NULL ); in test__kmod_path__parse()
55 T("/xxxx/xxxx/x-x.ko", true , true, 0 , "[x_x]"); in test__kmod_path__parse()
56 T("/xxxx/xxxx/x-x.ko", false , true, 0 , NULL ); in test__kmod_path__parse()
63 T("/xxxx/xxxx/x.ko.gz", true , true, 1 , "[x]"); in test__kmod_path__parse()
64 T("/xxxx/xxxx/x.ko.gz", false , true, 1 , NULL ); in test__kmod_path__parse()
65 T("/xxxx/xxxx/x.ko.gz", true , true, 1 , "[x]"); in test__kmod_path__parse()
66 T("/xxxx/xxxx/x.ko.gz", false , true, 1 , NULL ); in test__kmod_path__parse()
72 T("/xxxx/xxxx/x.gz", true , false, 1 , "x.gz"); in test__kmod_path__parse()
[all …]
/linux/rust/kernel/sync/
H A Datomic.rs52 pub struct Atomic<T: AtomicType>(AtomicRepr<T::Repr>);
55 unsafe impl<T: AtomicType> Sync for Atomic<T> {}
130 const fn into_repr<T: AtomicType>(v: T) -> T::Repr { in into_repr()
140 const unsafe fn from_repr<T: AtomicType>(r: T::Repr) -> T { in from_repr() argument
145 impl<T: AtomicType> Atomic<T> {
147 pub const fn new(v: T) -> Self { in new()
207 pub unsafe fn from_ptr<'a>(ptr: *mut T) -> &'a Self in from_ptr()
209 T: Sync, in from_ptr()
228 pub const fn as_ptr(&self) -> *mut T { in as_ptr() argument
238 pub fn get_mut(&mut self) -> &mut T { in get_mut() argument
[all …]
H A Dlock.rs106 pub struct Lock<T: ?Sized, B: Backend> {
119 pub(crate) data: UnsafeCell<T>,
123 unsafe impl<T: ?Sized + Send, B: Backend> Send for Lock<T, B> {}
127 unsafe impl<T: ?Sized + Send, B: Backend> Sync for Lock<T, B> {}
129 impl<T, B: Backend> Lock<T, B> {
132 t: impl PinInit<T>, in new() argument
171 impl<T
172 lock(&self) -> Guard<'_, T, B> lock() argument
185 try_lock(&self) -> Option<Guard<'_, T, B>> try_lock() argument
234 lock_ref(&self) -> &'a Lock<T, B> lock_ref() argument
269 as_mut(&mut self) -> Pin<&mut T> as_mut() argument
307 new(lock: &'a Lock<T, B>, state: B::GuardState) -> Self new() argument
[all...]
/linux/rust/kernel/
H A Ddebugfs.rs98 fn create_file<'a, T, E: 'a>( in create_file()
101 data: impl PinInit<T, E> + 'a,
102 file_ops: &'static FileOps<T>,
103 ) -> impl PinInit<File<T>, E> + 'a
105 T: Sync + 'static,
107 let scope = Scope::<T>::new(data, move |data| {
165 pub fn read_only_file<'a, T, E: 'a>(
168 data: impl PinInit<T, E> + 'a,
169 ) -> impl PinInit<File<T>, E> + 'a
171 T argument
74 create_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, file_ops: &'static FileOps<T>, ) -> impl PinInit<File<T>, E> + 'a where T: Sync + 'static, create_file() argument
77 create_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, file_ops: &'static FileOps<T>, ) -> impl PinInit<File<T>, E> + 'a where T: Sync + 'static, create_file() argument
78 create_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, file_ops: &'static FileOps<T>, ) -> impl PinInit<File<T>, E> + 'a where T: Sync + 'static, create_file() argument
79 create_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, file_ops: &'static FileOps<T>, ) -> impl PinInit<File<T>, E> + 'a where T: Sync + 'static, create_file() argument
144 read_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Send + Sync + 'static, read_only_file() argument
147 read_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Send + Sync + 'static, read_only_file() argument
148 read_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Send + Sync + 'static, read_only_file() argument
174 read_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryWriter + Send + Sync + 'static, read_binary_file() argument
175 read_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryWriter + Send + Sync + 'static, read_binary_file() argument
208 read_callback_file<'a, T, E: 'a, F>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
211 read_callback_file<'a, T, E: 'a, F>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
213 read_callback_file<'a, T, E: 'a, F>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
216 read_callback_file<'a, T, E: 'a, F>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
226 read_write_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Reader + Send + Sync + 'static, read_write_file() argument
229 read_write_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Reader + Send + Sync + 'static, read_write_file() argument
230 read_write_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Reader + Send + Sync + 'static, read_write_file() argument
242 read_write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryWriter + BinaryReader + Send + Sync + 'static, read_write_binary_file() argument
245 read_write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryWriter + BinaryReader + Send + Sync + 'static, read_write_binary_file() argument
246 read_write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryWriter + BinaryReader + Send + Sync + 'static, read_write_binary_file() argument
260 read_write_callback_file<'a, T, E: 'a, F, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
263 read_write_callback_file<'a, T, E: 'a, F, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
266 read_write_callback_file<'a, T, E: 'a, F, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
269 read_write_callback_file<'a, T, E: 'a, F, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
270 read_write_callback_file<'a, T, E: 'a, F, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
285 write_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Reader + Send + Sync + 'static, write_only_file() argument
288 write_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Reader + Send + Sync + 'static, write_only_file() argument
289 write_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Reader + Send + Sync + 'static, write_only_file() argument
302 write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryReader + Send + Sync + 'static, write_binary_file() argument
305 write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryReader + Send + Sync + 'static, write_binary_file() argument
306 write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryReader + Send + Sync + 'static, write_binary_file() argument
317 write_callback_file<'a, T, E: 'a, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_callback_file() argument
320 write_callback_file<'a, T, E: 'a, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_callback_file() argument
322 write_callback_file<'a, T, E: 'a, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_callback_file() argument
325 write_callback_file<'a, T, E: 'a, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_callback_file() argument
364 scope<'a, T: 'a, E: 'a, F>( &'a self, data: impl PinInit<T, E> + 'a, name: &'a CStr, init: F, ) -> impl PinInit<Scope<T>, E> + 'a where F: for<'data, 'dir> FnOnce(&'data T, &'dir ScopedDir<'data, 'dir>) + 'a, scope() argument
367 scope<'a, T: 'a, E: 'a, F>( &'a self, data: impl PinInit<T, E> + 'a, name: &'a CStr, init: F, ) -> impl PinInit<Scope<T>, E> + 'a where F: for<'data, 'dir> FnOnce(&'data T, &'dir ScopedDir<'data, 'dir>) + 'a, scope() argument
369 scope<'a, T: 'a, E: 'a, F>( &'a self, data: impl PinInit<T, E> + 'a, name: &'a CStr, init: F, ) -> impl PinInit<Scope<T>, E> + 'a where F: for<'data, 'dir> FnOnce(&'data T, &'dir ScopedDir<'data, 'dir>) + 'a, scope() argument
411 new<E: 'b, F>(data: impl PinInit<T, E> + 'b, init: F) -> impl PinInit<Self, E> + 'b where F: for<'a> FnOnce(&'a T) + 'b, new() argument
435 new<E: 'b, F>(data: impl PinInit<T, E> + 'b, init: F) -> impl PinInit<Self, E> + 'b where F: for<'a> FnOnce(&'a T) -> Entry<'static> + 'b, new() argument
463 dir<E: 'a, F>( data: impl PinInit<T, E> + 'a, name: &'a CStr, init: F, ) -> impl PinInit<Self, E> + 'a where F: for<'data, 'dir> FnOnce(&'data T, &'dir ScopedDir<'data, 'dir>) + 'a, dir() argument
468 dir<E: 'a, F>( data: impl PinInit<T, E> + 'a, name: &'a CStr, init: F, ) -> impl PinInit<Self, E> + 'a where F: for<'data, 'dir> FnOnce(&'data T, &'dir ScopedDir<'data, 'dir>) + 'a, dir() argument
480 deref(&self) -> &T deref() argument
487 deref(&self) -> &T deref() argument
517 create_file<T: Sync>(&self, name: &CStr, data: &'data T, vtable: &'static FileOps<T>) create_file() argument
529 read_only_file<T: Writer + Send + Sync + 'static>(&self, name: &CStr, data: &'data T) read_only_file() argument
542 read_binary_file<T: BinaryWriter + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) read_binary_file() argument
558 read_callback_file<T, F>(&self, name: &CStr, data: &'data T, _f: &'static F) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
561 read_callback_file<T, F>(&self, name: &CStr, data: &'data T, _f: &'static F) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
578 read_write_file<T: Writer + Reader + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) read_write_file() argument
594 read_write_binary_file<T: BinaryWriter + BinaryReader + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) read_write_binary_file() argument
610 read_write_callback_file<T, F, W>( &self, name: &CStr, data: &'data T, _f: &'static F, _w: &'static W, ) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
613 read_write_callback_file<T, F, W>( &self, name: &CStr, data: &'data T, _f: &'static F, _w: &'static W, ) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
618 read_write_callback_file<T, F, W>( &self, name: &CStr, data: &'data T, _f: &'static F, _w: &'static W, ) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
619 read_write_callback_file<T, F, W>( &self, name: &CStr, data: &'data T, _f: &'static F, _w: &'static W, ) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
634 write_only_file<T: Reader + Send + Sync + 'static>(&self, name: &CStr, data: &'data T) write_only_file() argument
648 write_binary_file<T: BinaryReader + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) write_binary_file() argument
663 write_only_callback_file<T, W>(&self, name: &CStr, data: &'data T, _w: &'static W) where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_only_callback_file() argument
666 write_only_callback_file<T, W>(&self, name: &CStr, data: &'data T, _w: &'static W) where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_only_callback_file() argument
[all...]
H A Dlist.rs263 pub struct List<T: ?Sized + ListItem<ID>, const ID: u64 = 0> {
265 _ty: PhantomData<ListArc<T, ID>>,
270 unsafe impl<T, const ID: u64> Send for List<T, ID>
272 ListArc<T, ID>: Send,
273 T: ?Sized + ListItem<ID>,
278 unsafe impl<T, const ID: u64> Sync for List<T, ID>
280 ListArc<T, ID>: Sync,
281 T: ?Sized + ListItem<ID>,
420 pub struct ListLinksSelfPtr<T: ?Sized, const ID: u64 = 0> {
427 self_ptr: Opaque<*const T>,
[all …]
H A Dtypes.rs220 pub struct ScopeGuard<T, F: FnOnce(T)>(Option<(T, F)>);
222 impl<T, F: FnOnce(T)> ScopeGuard<T, F> {
224 pub fn new_with_data(data: T, cleanup_func: F) -> Self { in new_with_data() argument
230 pub fn dismiss(mut self) -> T { in dismiss() argument
244 impl<T, F: FnOnce(T)> Deref for ScopeGuard<T, F> {
245 type Target = T;
247 fn deref(&self) -> &T { in deref() argument
253 impl<T, F: FnOnce(T)> DerefMut for ScopeGuard<T, F> {
254 fn deref_mut(&mut self) -> &mut T { in deref_mut() argument
260 impl<T, F: FnOnce(T)> Drop for ScopeGuard<T, F> {
[all …]
H A Dmaple_tree.rs29 pub struct MapleTree<T: ForeignOwnable> {
32 _p: PhantomData<T>,
40 pub struct MapleTreeAlloc<T: ForeignOwnable> {
42 tree: MapleTree<T>,
46 impl<T: ForeignOwnable> core::ops::Deref for MapleTreeAlloc<T> {
47 type Target = MapleTree<T>;
50 fn deref(&self) -> &MapleTree<T> { in deref() argument
76 impl<T: ForeignOwnable> MapleTree<T> {
121 pub fn insert(&self, index: usize, value: T, gfp: Flags) -> Result<(), InsertError<T>> { in insert() argument
169 pub fn insert_range<R>(&self, range: R, value: T, gfp: Flags) -> Result<(), InsertError<T>> in insert_range() argument
[all …]
H A Dxarray.rs56 pub struct XArray<T: ForeignOwnable> {
59 _p: PhantomData<T>,
63 impl<T: ForeignOwnable> PinnedDrop for XArray<T> {
71 drop(unsafe { T::from_foreign(ptr) }) in drop()
87 impl<T: ForeignOwnable> XArray<T> {
122 pub fn try_lock(&self) -> Option<Guard<'_, T>> { in try_lock() argument
135 pub fn lock(&self) -> Guard<'_, T> { in lock() argument
150 pub struct Guard<'a, T: ForeignOwnable> {
151 xa: &'a XArray<T>,
155 impl<T: ForeignOwnable> Drop for Guard<'_, T> {
[all …]
/linux/rust/kernel/debugfs/
H A Dfile_ops.rs28 /// `FileOps<T>` will always contain an `operations` which is safe to use for a file backed
29 /// off an inode which has a pointer to a `T` in its private data that is safe to convert
31 pub(super) struct FileOps<T> {
36 _phantom: PhantomData<T>, in new()
39 impl<T> FileOps<T> { in new()
43 /// inode has a pointer to `T` in its private data that is safe to convert into a reference. in new()
60 impl<T: Adapter> FileOps<T> {
61 pub(super) const fn adapt(&self) -> &FileOps<T
122 impl<T: Writer + Sync> ReadFile<T> for T { global() implementation
140 read<T: Reader + Sync>(data: &T, buf: *const c_char, count: usize) -> isize read() argument
165 let data = unsafe { &*(seq.private as *const T) }; write() constant
174 impl<T: Writer + Reader + Sync> ReadWriteFile<T> for T { global() implementation
224 let data = unsafe { &*((*file).private_data as *const T) }; write_only_write() constant
232 impl<T: Reader + Sync> WriteFile<T> for T { global() implementation
285 impl<T: BinaryWriter + Sync> BinaryReadFile<T> for T { global() implementation
340 impl<T: BinaryReader + Sync> BinaryWriteFile<T> for T { global() implementation
365 impl<T: BinaryWriter + BinaryReader + Sync> BinaryReadWriteFile<T> for T { global() implementation
[all...]
H A Dtraits.rs53 impl<T: Writer> Writer for Mutex<T> { in write_to_slice()
59 impl<T: fmt::Debug> Writer for T { implementation
79 // Base implementation for any `T: AsBytes`. in write_to_slice()
80 impl<T: AsBytes> BinaryWriter for T {
90 // Delegate for `Mutex<T>`: Support a `T` with an outer mutex. in write_to_slice()
91 impl<T in write_to_slice()
38 impl<T: fmt::Debug> Writer for T { global() implementation
213 impl<T: AsBytes + FromBytes> BinaryReaderMut for T { global() implementation
[all...]
/linux/rust/proc-macro2/
H A Drcvec.rs9 pub(crate) struct RcVec<T> {
10 inner: Rc<Vec<T>>,
13 pub(crate) struct RcVecBuilder<T> {
14 inner: Vec<T>,
17 pub(crate) struct RcVecMut<'a, T> {
18 inner: &'a mut Vec<T>,
22 pub(crate) struct RcVecIntoIter<T> {
23 inner: vec::IntoIter<T>,
26 impl<T> RcVec<T> {
35 pub(crate) fn iter(&self) -> slice::Iter<T> { in iter() argument
[all …]
/linux/rust/kernel/list/
H A Darc.rs19 /// a [`ListArc`] exists or not. We refer to this logic as "the tracking inside `T`".
21 /// We allow the case where the tracking inside `T` thinks that a [`ListArc`] exists, but actually,
28 /// A consequence of the above is that you may implement the tracking inside `T` by not actually
143 /// relevant tracking is referred to as "the tracking inside `T`", and the [`ListArcSafe`] trait
146 /// Note that we allow the case where the tracking inside `T` thinks that a `ListArc` exists, but
158 /// * The tracking inside `T` is aware that a `ListArc` reference exists.
163 pub struct ListArc<T, const ID: u64 = 0>
165 T: ListArcSafe<ID> + ?Sized,
167 arc: Arc<T>,
170 impl<T
173 new(contents: T, flags: Flags) -> Result<Self, AllocError> new() argument
183 pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Self, E> where E: From<AllocError>, pin_init() argument
194 init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> where E: From<AllocError>, init() argument
237 pair_from_unique<const ID2: u64>(unique: UniqueArc<T>) -> (Self, ListArc<T, ID2>) where T: ListArcSafe<ID2>, pair_from_unique() argument
249 pair_from_pin_unique<const ID2: u64>( mut unique: Pin<UniqueArc<T>>, ) -> (Self, ListArc<T, ID2>) where T: ListArcSafe<ID2>, pair_from_pin_unique() argument
250 pair_from_pin_unique<const ID2: u64>( mut unique: Pin<UniqueArc<T>>, ) -> (Self, ListArc<T, ID2>) where T: ListArcSafe<ID2>, pair_from_pin_unique() argument
337 transmute_to_arc(self) -> Arc<T> transmute_to_arc() argument
349 into_raw(self) -> *const T into_raw() argument
371 into_arc(self) -> Arc<T> into_arc() argument
380 clone_arc(&self) -> Arc<T> clone_arc() argument
391 as_arc(&self) -> &Arc<T> as_arc() argument
400 as_arc_borrow(&self) -> ArcBorrow<'_, T> as_arc_borrow() argument
440 as_ref(&self) -> &Arc<T> as_ref() argument
[all...]
/linux/drivers/comedi/drivers/tests/
H A Dni_routes_test.c310 const struct ni_route_tables *T = &private.routing_tables; in test_ni_route_to_register() local
313 unittest(ni_route_to_register(O(0), O(0), T) < 0, in test_ni_route_to_register()
315 unittest(ni_route_to_register(O(1), O(0), T) == 1, in test_ni_route_to_register()
317 unittest(ni_route_to_register(O(6), O(5), T) == 6, in test_ni_route_to_register()
319 unittest(ni_route_to_register(O(8), O(9), T) == 8, in test_ni_route_to_register()
323 unittest(ni_route_to_register(rgout0_src0, TRIGGER_LINE(0), T) == 0, in test_ni_route_to_register()
325 unittest(ni_route_to_register(rgout0_src0, TRIGGER_LINE(1), T) == 0, in test_ni_route_to_register()
327 unittest(ni_route_to_register(rgout0_src1, TRIGGER_LINE(2), T) == 1, in test_ni_route_to_register()
329 unittest(ni_route_to_register(rgout0_src1, TRIGGER_LINE(3), T) == 1, in test_ni_route_to_register()
332 unittest(ni_route_to_register(brd0_src0, TRIGGER_LINE(4), T) == in test_ni_route_to_register()
[all …]
/linux/tools/testing/selftests/rcutorture/bin/
H A Dtorture.sh264 T="`mktemp -d ${TMPDIR-/tmp}/torture.sh.XXXXXX`"
265 trap 'rm -rf $T' 0 2
267 echo " --- " $scriptname $args | tee -a $T/log
268 echo " --- Results directory: " $ds | tee -a $T/log
276 echo " --- Everything disabled, so explicit --do-normal overridden" | tee -a $T/log
289 echo " --- Zero time for rcutorture, disabling" | tee -a $T/log
301 echo " --- Zero time for locktorture, disabling" | tee -a $T/log
313 echo " --- Zero time for scftorture, disabling" | tee -a $T/log
324 touch $T/failures
325 touch $T/successe
[all...]
/linux/scripts/
H A Ddecodecode14 rm -f $T $T.s $T.o $T.oo $T.aa $T.dis
25 T=`mktemp` || die "cannot create temp file"
51 rm $T
215 touch $T.oo
221 echo All code >> $T.oo
222 echo ======== >> $T.oo
224 echo -n " .$type 0x" > $T.s
226 echo $beforemark | sed -e 's/ /,0x/g; s/[<>()]//g' >> $T.s
228 disas $T $pc_sub
230 cat $T.dis >> $T.oo
[all …]
/linux/rust/quote/
H A Druntime.rs77 impl<T: Iterator> RepIteratorExt for T {} implementation
96 impl<T: ToTokens + ?Sized> RepToTokensExt for T {} implementation
107 impl<'q, T: RepAsIteratorExt<'q> + ?Sized> RepAsIteratorExt<'q> for &T { implementation
108 type Iter = T::Iter;
111 <T as RepAsIteratorExt>::quote_into_iter(*self) in quote_into_iter()
115 impl<'q, T: RepAsIteratorExt<'q> + ?Sized> RepAsIteratorExt<'q> for &mut T { implementation
116 type Iter = T::Iter;
119 <T as RepAsIteratorExt>::quote_into_iter(*self) in quote_into_iter()
123 impl<'q, T: 'q> RepAsIteratorExt<'q> for [T] { implementation
124 type Iter = slice::Iter<'q, T>;
[all …]

12345678910>>...20