2 * Copyright (c) 2009 Intel Corp., Inc. All rights reserved.
\r
4 * This software is available to you under the OpenIB.org BSD license
\r
7 * Redistribution and use in source and binary forms, with or
\r
8 * without modification, are permitted provided that the following
\r
9 * conditions are met:
\r
11 * - Redistributions of source code must retain the above
\r
12 * copyright notice, this list of conditions and the following
\r
15 * - Redistributions in binary form must reproduce the above
\r
16 * copyright notice, this list of conditions and the following
\r
17 * disclaimer in the documentation and/or other materials
\r
18 * provided with the distribution.
\r
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV
\r
23 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
\r
24 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
25 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
26 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
32 #ifndef COMP_CHANNEL_H
\r
33 #define COMP_CHANNEL_H
\r
35 #include <windows.h>
\r
41 typedef struct _COMP_ENTRY
\r
43 struct _COMP_ENTRY *Next;
\r
45 struct _COMP_CHANNEL *Channel;
\r
49 typedef struct _COMP_CHANNEL
\r
51 struct _COMP_MANAGER *Manager;
\r
53 COMP_ENTRY **TailPtr;
\r
54 CRITICAL_SECTION Lock;
\r
59 typedef struct _COMP_MANAGER
\r
67 DWORD CompManagerOpen(COMP_MANAGER *pMgr);
\r
68 void CompManagerClose(COMP_MANAGER *pMgr);
\r
69 DWORD CompManagerMonitor(COMP_MANAGER *pMgr, HANDLE hFile, ULONG_PTR Key);
\r
70 DWORD CompManagerPoll(COMP_MANAGER *pMgr, DWORD Milliseconds,
\r
71 COMP_CHANNEL **ppChannel);
\r
73 void CompChannelInit(COMP_MANAGER *pMgr, COMP_CHANNEL *pChannel,
\r
74 DWORD Milliseconds);
\r
75 void CompChannelCleanup(COMP_CHANNEL *pChannel);
\r
76 DWORD CompChannelPoll(COMP_CHANNEL *pChannel, COMP_ENTRY **ppEntry);
\r
77 void CompChannelRemoveEntry(COMP_CHANNEL *pChannel, COMP_ENTRY *pEntry);
\r
79 void CompEntryInit(COMP_CHANNEL *pChannel, COMP_ENTRY *pEntry);
\r
80 DWORD CompEntryPost(COMP_ENTRY *pEntry);
\r
86 #endif /* COMP_CHANNEL_H */
\r