]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Get rid of compat_pollwait definitions.
authorVMware, Inc <>
Thu, 17 Jun 2010 22:18:24 +0000 (15:18 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 17 Jun 2010 22:18:24 +0000 (15:18 -0700)
We do not support kernels that do not have epoll so we can clean code up
a bit. I'll remove autoconf/epoll.c in a subsequent change.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/modules/linux/shared/compat_wait.h

index e4a27b16a8c0e839c0724964478fe55ceeb76901..407b0ea3d560ba632d657f35dc52f8469f45e8fc 100644 (file)
@@ -46,82 +46,6 @@ typedef struct wait_queue wait_queue_t;
 
 #endif
 
-/*
- * The 'struct poll_wqueues' appeared in 2.5.48, when global
- * /dev/epoll interface was added.  It was backported to the
- * 2.4.20-wolk4.0s.
- */
-
-#if defined(VMW_HAVE_EPOLL) || \
-    LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9) // {
-#define compat_poll_wqueues struct poll_wqueues
-#else // } {
-#define compat_poll_wqueues poll_table
-#endif // }
-
-#ifdef VMW_HAVE_EPOLL // {
-
-/* If prototype does not match, build will abort here */
-extern void poll_initwait(compat_poll_wqueues *);
-
-#define compat_poll_initwait(wait, table) ( \
-   poll_initwait((table)), \
-   (wait) = &(table)->pt \
-)
-
-#define compat_poll_freewait(wait, table) ( \
-   poll_freewait((table)) \
-)
-
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // {
-
-/* If prototype does not match, build will abort here */
-extern void poll_initwait(compat_poll_wqueues *);
-
-#define compat_poll_initwait(wait, table) ( \
-   (wait) = (table), \
-   poll_initwait(wait) \
-)
-
-#define compat_poll_freewait(wait, table) ( \
-   poll_freewait((table)) \
-)
-
-#else // } {
-
-#define compat_poll_initwait(wait, table) ( \
-   (wait) = (table), /* confuse compiler */ \
-   (wait) = (poll_table *) __get_free_page(GFP_KERNEL), \
-   (wait)->nr = 0, \
-   (wait)->entry = (struct poll_table_entry *)((wait) + 1), \
-   (wait)->next = NULL \
-)
-
-static inline void
-poll_freewait(poll_table *wait)
-{
-   while (wait) {
-      struct poll_table_entry * entry;
-      poll_table *old;
-
-      entry = wait->entry + wait->nr;
-      while (wait->nr > 0) {
-        wait->nr--;
-        entry--;
-        remove_wait_queue(entry->wait_address, &entry->wait);
-        compat_fput(entry->filp);
-      }
-      old = wait;
-      wait = wait->next;
-      free_page((unsigned long) old);
-   }
-}
-
-#define compat_poll_freewait(wait, table) ( \
-   poll_freewait((wait)) \
-)
-
-#endif // }
 
 /*
  * The wait_event_interruptible_timeout() interface is not