From: VMware, Inc <> Date: Thu, 17 Jun 2010 22:18:24 +0000 (-0700) Subject: Get rid of compat_pollwait definitions. X-Git-Tag: 2010.06.16-268169~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b83d23d784dd365e4cbb43dd2efe845592d3a3dd;p=thirdparty%2Fopen-vm-tools.git Get rid of compat_pollwait definitions. 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 --- diff --git a/open-vm-tools/modules/linux/shared/compat_wait.h b/open-vm-tools/modules/linux/shared/compat_wait.h index e4a27b16a..407b0ea3d 100644 --- a/open-vm-tools/modules/linux/shared/compat_wait.h +++ b/open-vm-tools/modules/linux/shared/compat_wait.h @@ -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