diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-11-30 20:45:22 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2022-03-15 12:57:39 +0100 |
commit | a384398eae7f8c3dd4ad7c0f764451f744a2de60 (patch) | |
tree | 75816883f4aa5b1547949bcc07574dc821be67c8 | |
parent | 061edec0478386383fbf0a11f16b17fc88ff6d72 (diff) | |
download | tip-a384398eae7f8c3dd4ad7c0f764451f744a2de60.tar.gz |
headers/deps: poll: Introduce <linux/poll_time.h> for time related APIs
<linux/poll.h.h> is used in over 3,800 files, while the time
related functions are only used in ~4 files.
So move them over into their new <linux/poll_time.h> header.
The motivation is to allow the reduction of <linux/poll.h.h>
header dependencies.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | include/linux/poll.h | 10 | ||||
-rw-r--r-- | include/linux/poll_time.h | 19 |
2 files changed, 19 insertions, 10 deletions
diff --git a/include/linux/poll.h b/include/linux/poll.h index cdb4bad39c82f7..4df461ad90ae31 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h @@ -11,7 +11,6 @@ #include <uapi/linux/eventpoll.h> struct file; -struct timespec64; /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating additional memory. */ @@ -99,15 +98,6 @@ struct poll_wqueues { extern void poll_initwait(struct poll_wqueues *pwq); extern void poll_freewait(struct poll_wqueues *pwq); -extern u64 select_estimate_accuracy(struct timespec64 *tv); - -#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1) - -extern int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, - fd_set __user *exp, struct timespec64 *end_time); - -extern int poll_select_set_timeout(struct timespec64 *to, time64_t sec, - long nsec); #define __MAP_POLL(v, from, to) \ (from < to ? (v & from) * (to/from) : (v & from) / (from/to)) diff --git a/include/linux/poll_time.h b/include/linux/poll_time.h index 3a62d1e75e004d..a97d45302bc6d0 100644 --- a/include/linux/poll_time.h +++ b/include/linux/poll_time.h @@ -1 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_POLL_TIME_H +#define _LINUX_POLL_TIME_H + #include <linux/poll.h> + +#include <linux/time64_types.h> +#include <linux/ktime.h> + + +extern u64 select_estimate_accuracy(struct timespec64 *tv); + +#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1) + +extern int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, + fd_set __user *exp, struct timespec64 *end_time); + +extern int poll_select_set_timeout(struct timespec64 *to, time64_t sec, + long nsec); +#endif /* _LINUX_POLL_TIME_H */ |