mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 13:43:55 +08:00
Delete the __FD_*() funcs for operating on fd_set from linux/time.h
Delete the __FD_*() functions for operating on fd_set structs from linux/time.h as they're no longer used within the kernel with the preceding patch and are not exported to userspace. Whilst linux/time.h *does* export the FD_*() equivalents as wrappers around __FD_*(), userspace provides its own definition of __FD_*(). Note that the definition of FD_ZERO() in linux/time.h may not be used with the fd_sets associated with struct fdtable as the fd_set may have been allocated in a truncated fashion. Signed-off-by: David Howells <dhowells@redhat.com> Link: http://lkml.kernel.org/r/20120216175006.23314.18984.stgit@warthog.procyon.org.uk Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
1fd36adcd9
commit
cf420048b3
@ -4,11 +4,8 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
# include <linux/bitops.h>
|
||||
# include <linux/cache.h>
|
||||
# include <linux/posix_types.h>
|
||||
# include <linux/seqlock.h>
|
||||
# include <linux/string.h>
|
||||
# include <linux/math64.h>
|
||||
#endif
|
||||
|
||||
@ -260,26 +257,6 @@ static __always_inline void timespec_add_ns(struct timespec *a, u64 ns)
|
||||
a->tv_nsec = ns;
|
||||
}
|
||||
|
||||
static inline void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
|
||||
{
|
||||
__set_bit(__fd, __fdsetp->fds_bits);
|
||||
}
|
||||
|
||||
static inline void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
|
||||
{
|
||||
__clear_bit(__fd, __fdsetp->fds_bits);
|
||||
}
|
||||
|
||||
static inline int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__fdsetp)
|
||||
{
|
||||
return test_bit(__fd, __fdsetp->fds_bits);
|
||||
}
|
||||
|
||||
static inline void __FD_ZERO(__kernel_fd_set *__fdsetp)
|
||||
{
|
||||
memset(__fdsetp->fds_bits, 0, sizeof __fdsetp->fds_bits);
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#define NFDBITS __NFDBITS
|
||||
|
Loading…
Reference in New Issue
Block a user