#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