| /linux/tools/debugging/ |
| H A D | kernel-chktaint | 48 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 / 2` 79 if [ `expr $T % 2` -eq 0 ]; then 86 T=`expr $T / 2` 87 if [ `expr $T % 2` -eq 0 ]; then [all …]
|
| /linux/drivers/net/wireguard/selftest/ |
| H A D | counter.c | 24 #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/sync/ |
| H A D | arc.rs | 132 pub struct Arc<T: ?Sized> { 133 ptr: NonNull<ArcInner<T>>, 142 _p: PhantomData<ArcInner<T>>, 147 struct ArcInner<T: ?Sized> { 149 data: T, 152 impl<T: ?Sized> ArcInner<T> { 159 unsafe fn container_of(ptr: *const T) -> NonNull<ArcInner<T>> { in container_of() argument 172 let ptr = ptr as *const ArcInner<T>; in container_of() 188 impl<T: ?Sized + core::marker::Unsize<U>, U: ?Sized> core::ops::CoerceUnsized<Arc<U>> for Arc<T> {} 192 impl<T: ?Sized + core::marker::Unsize<U>, U: ?Sized> core::ops::DispatchFromDyn<Arc<U>> for Arc<T> … [all …]
|
| H A D | atomic.rs | 50 pub struct Atomic<T: AtomicType>(AtomicRepr<T::Repr>); 53 unsafe impl<T: AtomicType> Sync for Atomic<T> {} 128 const fn into_repr<T: AtomicType>(v: T) -> T::Repr { in into_repr() 138 const unsafe fn from_repr<T: AtomicType>(r: T::Repr) -> T { in from_repr() argument 143 impl<T: AtomicType> Atomic<T> { 145 pub const fn new(v: T) -> Self { in new() 205 pub unsafe fn from_ptr<'a>(ptr: *mut T) -> &'a Self in from_ptr() 207 T: Sync, in from_ptr() 226 pub const fn as_ptr(&self) -> *mut T { in as_ptr() argument 236 pub fn get_mut(&mut self) -> &mut T { in get_mut() argument [all …]
|
| H A D | aref.rs | 68 pub struct ARef<T: AlwaysRefCounted> { 69 ptr: NonNull<T>, 70 _p: PhantomData<T>, 77 unsafe impl<T: AlwaysRefCounted + Sync + Send> Send for ARef<T> {} 84 unsafe impl<T: AlwaysRefCounted + Sync + Send> Sync for ARef<T> {} 86 impl<T: AlwaysRefCounted> ARef<T> { 97 pub unsafe fn from_raw(ptr: NonNull<T>) -> Self { in from_raw() 133 pub fn into_raw(me: Self) -> NonNull<T> { in into_raw() argument 138 impl<T: AlwaysRefCounted> Clone for ARef<T> { 146 impl<T: AlwaysRefCounted> Deref for ARef<T> { [all …]
|
| /linux/rust/kernel/alloc/ |
| H A D | kbox.rs | 81 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 D | kvec.rs | 104 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/tools/perf/tests/ |
| H A D | kmod-path.c | 44 #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/time/hrtimer/ |
| H A D | arc.rs | 16 pub struct ArcHrTimerHandle<T> 18 T: HasHrTimer<T>, 20 pub(crate) inner: Arc<T>, 25 unsafe impl<T> HrTimerHandle for ArcHrTimerHandle<T> 27 T: HasHrTimer<T>, 34 let timer_ptr = unsafe { <T as HasHrTimer<T>>::raw_get_timer(self_ptr) }; in cancel() 38 unsafe { HrTimer::<T>::raw_cancel(timer_ptr) } in cancel() 42 impl<T> Drop for ArcHrTimerHandle<T> 44 T: HasHrTimer<T>, 51 impl<T> HrTimerPointer for Arc<T> [all …]
|
| H A D | tbox.rs | 20 pub struct BoxHrTimerHandle<T, A> 22 T: HasHrTimer<T>, 25 pub(crate) inner: NonNull<T>, 31 unsafe impl<T, A> HrTimerHandle for BoxHrTimerHandle<T, A> 33 T: HasHrTimer<T>, 39 let timer_ptr = unsafe { <T as HasHrTimer<T>>::raw_get_timer(self.inner.as_ptr()) }; in cancel() 43 unsafe { HrTimer::<T>::raw_cancel(timer_ptr) } in cancel() 47 impl<T, A> Drop for BoxHrTimerHandle<T, A> 49 T: HasHrTimer<T>, 56 drop(unsafe { Box::<T, A>::from_raw(self.inner.as_ptr()) }) in drop() [all …]
|
| H A D | pin.rs | 15 pub struct PinHrTimerHandle<'a, T> 17 T: HasHrTimer<T>, 19 pub(crate) inner: Pin<&'a T>, 24 unsafe impl<'a, T> HrTimerHandle for PinHrTimerHandle<'a, T> 26 T: HasHrTimer<T>, 29 let self_ptr: *const T = self.inner.get_ref(); in cancel() constant 33 let timer_ptr = unsafe { <T as HasHrTimer<T>>::raw_get_timer(self_ptr) }; in cancel() 37 unsafe { HrTimer::<T>::raw_cancel(timer_ptr) } in cancel() 41 impl<'a, T> Drop for PinHrTimerHandle<'a, T> 43 T: HasHrTimer<T>, [all …]
|
| H A D | pin_mut.rs | 11 pub struct PinMutHrTimerHandle<'a, T> 13 T: HasHrTimer<T>, 15 pub(crate) inner: NonNull<T>, 16 _p: PhantomData<&'a mut T>, 21 unsafe impl<'a, T> HrTimerHandle for PinMutHrTimerHandle<'a, T> 23 T: HasHrTimer<T>, 30 let timer_ptr = unsafe { <T as HasHrTimer<T>>::raw_get_timer(self_ptr) }; in cancel() 34 unsafe { HrTimer::<T>::raw_cancel(timer_ptr) } in cancel() 38 impl<'a, T> Drop for PinMutHrTimerHandle<'a, T> 40 T: HasHrTimer<T>, [all …]
|
| /linux/rust/pin-init/src/ |
| H A D | __internal.rs | 17 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 …]
|
| H A D | lib.rs | 1057 pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized { 1066 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E>; in __pinned_init() 1086 fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E> in pin_chain() argument 1088 F: FnOnce(Pin<&mut T>) -> Result<(), E>, in pin_chain() 1095 pub struct ChainPinInit<I, F, T: ?Sized, E>(I, F, __internal::Invariant<(E, T)>); 1101 unsafe impl<T: ?Sized, E, I, F> PinInit<T, E> for ChainPinInit<I, F, T, E> 1103 I: PinInit<T, E>, 1104 F: FnOnce(Pin<&mut T>) -> Result<(), E>, 1106 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> { in __pinned_init() 1156 pub unsafe trait Init<T: ?Sized, E = Infallible>: PinInit<T, E> { [all …]
|
| /linux/rust/kernel/ |
| H A D | debugfs.rs | 71 fn create_file<'a, T, E: 'a>( in create_file() argument 74 data: impl PinInit<T, E> + 'a, in create_file() argument 75 file_ops: &'static FileOps<T>, in create_file() argument 76 ) -> impl PinInit<File<T>, E> + 'a in create_file() argument 78 T: Sync + 'static, in create_file() 80 let scope = Scope::<T>::new(data, move |data| { in create_file() 141 pub fn read_only_file<'a, T, E: 'a>( in read_only_file() argument 144 data: impl PinInit<T, E> + 'a, in read_only_file() argument 145 ) -> impl PinInit<File<T>, E> + 'a in read_only_file() argument 147 T: Writer + Send + Sync + 'static, in read_only_file() [all …]
|
| H A D | list.rs | 263 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 D | types.rs | 220 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 D | workqueue.rs | 334 pub fn try_spawn<T: 'static + Send + FnOnce()>( in try_spawn() 337 func: T, in try_spawn() argument 353 struct ClosureWork<T> { 355 work: Work<ClosureWork<T>>, 356 func: Option<T>, 359 impl<T: FnOnce()> WorkItem for ClosureWork<T> { 479 pub struct Work<T: ?Sized, const ID: u64 = 0> { 482 _inner: PhantomData<T>, 488 unsafe impl<T: ?Sized, const ID: u64> Send for Work<T, ID> {} 492 unsafe impl<T: ?Sized, const ID: u64> Sync for Work<T, ID> {} [all …]
|
| H A D | maple_tree.rs | 29 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 D | xarray.rs | 56 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/list/ |
| H A D | arc.rs | 163 pub struct ListArc<T, const ID: u64 = 0> 165 T: ListArcSafe<ID> + ?Sized, 167 arc: Arc<T>, 170 impl<T: ListArcSafe<ID>, const ID: u64> ListArc<T, ID> { 173 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() argument 183 pub fn pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Self, E> in pin_init() argument 194 pub fn init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in init() argument 202 impl<T, const ID: u64> From<UniqueArc<T>> for ListArc<T, ID> 204 T: ListArcSafe<ID> + ?Sized, 208 fn from(unique: UniqueArc<T>) -> Self { in from() [all …]
|
| /linux/rust/kernel/debugfs/ |
| H A D | file_ops.rs | 21 pub(super) struct FileOps<T> { 26 _phantom: PhantomData<T>, 29 impl<T> FileOps<T> { 50 impl<T: Adapter> FileOps<T> { 51 pub(super) const fn adapt(&self) -> &FileOps<T::Inner> { in adapt() 58 impl<T> Deref for FileOps<T> { 66 struct WriterAdapter<T>(T); 68 impl<'a, T: Writer> Display for WriterAdapter<&'a T> { 81 unsafe extern "C" fn writer_open<T: Writer + Sync>( in writer_open() 93 unsafe { bindings::single_open(file, Some(writer_act::<T>), data) } in writer_open() [all …]
|
| /linux/drivers/comedi/drivers/tests/ |
| H A D | ni_routes_test.c | 310 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 D | torture.sh | 264 T="`mktemp -d ${TMPDIR-/tmp}/torture.sh.XXXXXX`" 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/successes 340 echo " --- $curflavor:" Start `date` | tee -a $T/log [all …]
|
| /linux/scripts/ |
| H A D | decodecode | 14 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 …]
|