[ofw] [PATCH] WV: Allow clients to use IOCPs

Fab Tillier ftillier at windows.microsoft.com
Mon Feb 23 12:02:44 PST 2009


This patch allows clients to use IOCPs.  It sets the lower bit of the event used for synchronous IOCTLs to prevent their completion from being reported to the IOCP.

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

Index: core/winverbs/user/wv_base.cpp
===================================================================
--- core/winverbs/user/wv_base.cpp      (revision 1978)
+++ core/winverbs/user/wv_base.cpp      (working copy)
@@ -52,7 +52,11 @@ STDMETHODIMP CWVBase::
 Init(void)
 {
        m_Overlap.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
-       return (m_Overlap.hEvent != NULL) ? WV_SUCCESS : WV_INSUFFICIENT_RESOURCES;
+       if( m_Overlap.hEvent == NULL )
+               return WV_INSUFFICIENT_RESOURCES;
+
+       m_Overlap.hEvent = (HANDLE)((ULONG_PTR)m_Overlap.hEvent | 1);
+       return WV_SUCCESS;
 }

 STDMETHODIMP_(ULONG) CWVBase::



More information about the ofw mailing list