Lines Matching defs:ptr

103 static __always_inline int __put_user_fn(void *x, void __user *ptr, unsigned long size)
109 rc = __put_user_asm((unsigned char __user *)ptr,
114 rc = __put_user_asm((unsigned short __user *)ptr,
119 rc = __put_user_asm((unsigned int __user *)ptr,
124 rc = __put_user_asm((unsigned long __user *)ptr,
160 static __always_inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size)
167 (unsigned char __user *)ptr,
172 (unsigned short __user *)ptr,
177 (unsigned int __user *)ptr,
182 (unsigned long __user *)ptr,
196 #define __put_user(x, ptr) \
198 __typeof__(*(ptr)) __x = (x); \
201 __chk_user_ptr(ptr); \
202 switch (sizeof(*(ptr))) { \
207 __pu_err = __put_user_fn(&__x, ptr, sizeof(*(ptr))); \
216 #define put_user(x, ptr) \
219 __put_user(x, ptr); \
222 #define __get_user(x, ptr) \
226 __chk_user_ptr(ptr); \
227 switch (sizeof(*(ptr))) { \
231 __gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
232 (x) = *(__force __typeof__(*(ptr)) *)&__x; \
238 __gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
239 (x) = *(__force __typeof__(*(ptr)) *)&__x; \
245 __gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
246 (x) = *(__force __typeof__(*(ptr)) *)&__x; \
252 __gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
253 (x) = *(__force __typeof__(*(ptr)) *)&__x; \
263 #define get_user(x, ptr) \
266 __get_user(x, ptr); \
569 * @ptr: User space address of value to compare to @old and exchange with
570 * @new. Must be aligned to sizeof(*@ptr).
571 * @uval: Address where the old value of *@ptr is written to.
572 * @old: Old value. Compared to the content pointed to by @ptr in order to
573 * determine if the exchange occurs. The old value read from *@ptr is
575 * @new: New value to place at *@ptr.
585 * -EFAULT: an exception happened when trying to access *@ptr
588 #define cmpxchg_user_key(ptr, uval, old, new, key) \
590 __typeof__(ptr) __ptr = (ptr); \