-/* $OpenBSD: uaccess.h,v 1.6 2021/07/07 02:38:36 jsg Exp $ */
+/* $OpenBSD: uaccess.h,v 1.7 2022/02/01 04:09:14 jsg Exp $ */
/*
* Copyright (c) 2015 Mark Kettenis
*
#include <linux/sched.h>
static inline unsigned long
-__copy_to_user(void *to, const void *from, unsigned len)
+__copy_to_user(void *to, const void *from, unsigned long len)
{
if (copyout(from, to, len))
return len;
}
static inline unsigned long
-copy_to_user(void *to, const void *from, unsigned len)
+copy_to_user(void *to, const void *from, unsigned long len)
{
return __copy_to_user(to, from, len);
}
static inline unsigned long
-__copy_from_user(void *to, const void *from, unsigned len)
+__copy_from_user(void *to, const void *from, unsigned long len)
{
if (copyin(from, to, len))
return len;
}
static inline unsigned long
-copy_from_user(void *to, const void *from, unsigned len)
+copy_from_user(void *to, const void *from, unsigned long len)
{
return __copy_from_user(to, from, len);
}
}
static inline unsigned long
-__copy_to_user_inatomic(void *to, const void *from, unsigned len)
+__copy_to_user_inatomic(void *to, const void *from, unsigned long len)
{
struct cpu_info *ci = curcpu();
int inatomic = ci->ci_inatomic;
}
static inline unsigned long
-__copy_from_user_inatomic(void *to, const void *from, unsigned len)
+__copy_from_user_inatomic(void *to, const void *from, unsigned long len)
{
struct cpu_info *ci = curcpu();
int inatomic = ci->ci_inatomic;
}
static inline unsigned long
-__copy_from_user_inatomic_nocache(void *to, const void *from, unsigned len)
+__copy_from_user_inatomic_nocache(void *to, const void *from, unsigned long len)
{
return __copy_from_user_inatomic(to, from, len);
}