|
@@ -1041,7 +1041,7 @@ void exit_itimers(struct signal_struct *sig)
|
|
|
}
|
|
|
|
|
|
SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
|
|
|
- const struct timespec __user *, tp)
|
|
|
+ const struct __kernel_timespec __user *, tp)
|
|
|
{
|
|
|
const struct k_clock *kc = clockid_to_kclock(which_clock);
|
|
|
struct timespec64 new_tp;
|
|
@@ -1056,7 +1056,7 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
|
|
|
}
|
|
|
|
|
|
SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
|
|
|
- struct timespec __user *,tp)
|
|
|
+ struct __kernel_timespec __user *, tp)
|
|
|
{
|
|
|
const struct k_clock *kc = clockid_to_kclock(which_clock);
|
|
|
struct timespec64 kernel_tp;
|
|
@@ -1097,7 +1097,7 @@ SYSCALL_DEFINE2(clock_adjtime, const clockid_t, which_clock,
|
|
|
}
|
|
|
|
|
|
SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock,
|
|
|
- struct timespec __user *, tp)
|
|
|
+ struct __kernel_timespec __user *, tp)
|
|
|
{
|
|
|
const struct k_clock *kc = clockid_to_kclock(which_clock);
|
|
|
struct timespec64 rtn_tp;
|
|
@@ -1114,7 +1114,7 @@ SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock,
|
|
|
return error;
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_COMPAT
|
|
|
+#ifdef CONFIG_COMPAT_32BIT_TIME
|
|
|
|
|
|
COMPAT_SYSCALL_DEFINE2(clock_settime, clockid_t, which_clock,
|
|
|
struct compat_timespec __user *, tp)
|
|
@@ -1149,6 +1149,10 @@ COMPAT_SYSCALL_DEFINE2(clock_gettime, clockid_t, which_clock,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
+#endif
|
|
|
+
|
|
|
+#ifdef CONFIG_COMPAT
|
|
|
+
|
|
|
COMPAT_SYSCALL_DEFINE2(clock_adjtime, clockid_t, which_clock,
|
|
|
struct compat_timex __user *, utp)
|
|
|
{
|
|
@@ -1173,6 +1177,10 @@ COMPAT_SYSCALL_DEFINE2(clock_adjtime, clockid_t, which_clock,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
+#endif
|
|
|
+
|
|
|
+#ifdef CONFIG_COMPAT_32BIT_TIME
|
|
|
+
|
|
|
COMPAT_SYSCALL_DEFINE2(clock_getres, clockid_t, which_clock,
|
|
|
struct compat_timespec __user *, tp)
|
|
|
{
|
|
@@ -1204,8 +1212,8 @@ static int common_nsleep(const clockid_t which_clock, int flags,
|
|
|
}
|
|
|
|
|
|
SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags,
|
|
|
- const struct timespec __user *, rqtp,
|
|
|
- struct timespec __user *, rmtp)
|
|
|
+ const struct __kernel_timespec __user *, rqtp,
|
|
|
+ struct __kernel_timespec __user *, rmtp)
|
|
|
{
|
|
|
const struct k_clock *kc = clockid_to_kclock(which_clock);
|
|
|
struct timespec64 t;
|
|
@@ -1228,7 +1236,8 @@ SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags,
|
|
|
return kc->nsleep(which_clock, flags, &t);
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_COMPAT
|
|
|
+#ifdef CONFIG_COMPAT_32BIT_TIME
|
|
|
+
|
|
|
COMPAT_SYSCALL_DEFINE4(clock_nanosleep, clockid_t, which_clock, int, flags,
|
|
|
struct compat_timespec __user *, rqtp,
|
|
|
struct compat_timespec __user *, rmtp)
|
|
@@ -1253,6 +1262,7 @@ COMPAT_SYSCALL_DEFINE4(clock_nanosleep, clockid_t, which_clock, int, flags,
|
|
|
|
|
|
return kc->nsleep(which_clock, flags, &t);
|
|
|
}
|
|
|
+
|
|
|
#endif
|
|
|
|
|
|
static const struct k_clock clock_realtime = {
|