- Timestamp:
- Dec 5, 2001, 7:06:57 PM (24 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/overlappedio.cpp
r7550 r7551 1 /* $Id: overlappedio.cpp,v 1. 2 2001-12-05 18:06:02sandervl Exp $ */1 /* $Id: overlappedio.cpp,v 1.3 2001-12-05 18:06:57 sandervl Exp $ */ 2 2 3 3 /* … … 86 86 //fall through 87 87 failed: 88 //SvL: NOTE: We might not fail edgracefully when threads have already been88 //SvL: NOTE: We might not fail gracefully when threads have already been 89 89 // created. (thread accessing memory that has been freed) 90 90 // Don't feel like wasting time to fix this as this should never -
trunk/src/kernel32/overlappedio.h
r7549 r7551 1 /* $Id: overlappedio.h,v 1. 1 2001-12-05 14:16:38sandervl Exp $ */1 /* $Id: overlappedio.h,v 1.2 2001-12-05 18:06:03 sandervl Exp $ */ 2 2 3 3 /* … … 13 13 #define __OVERLAPPEDIO_H__ 14 14 15 #define EVENT_READ 1 16 #define EVENT_WRITE 2 17 #define EVENT_READWRITE (EVENT_WRITE|EVENT_READ) 18 #define EVENT_POLL 4 19 20 //forward decl 21 class OverlappedIOHandler; 22 23 typedef struct { 24 DWORD fEvent; 25 OverlappedIOHandler *lpOverlappedObj; 26 } OVERLAPPED_THREAD_PARAM, *LPOVERLAPPED_THREAD_PARAM; 27 28 typedef DWORD (* SYSTEM LPOVERLAPPED_HANDLER)(DWORD dwUserData, LPOVERLAPPED lpOverlapped); 29 30 enum OverlappedIOError { 31 OutOfMemory, EventCreationFailed, ThreadCreationFailed 32 }; 15 33 16 34 class OverlappedIOHandler 17 35 { 18 36 public: 19 OverlappedIOHandler( 37 OverlappedIOHandler(LPOVERLAPPED_HANDLER lpReadHandler, 38 LPOVERLAPPED_HANDLER lpWriteHandler, 39 LPOVERLAPPED_HANDLER lpPollHandler = NULL); 40 ~OverlappedIOHandler(); 20 41 21 42 BOOL WriteFile(HANDLE hOS2Handle, … … 38 59 LPOVERLAPPED lpoOverlapped, 39 60 LPDWORD lpcbTransfer, 40 DWORD dwTimeout) 61 DWORD dwTimeout); 41 62 42 63 protected: … … 44 65 private: 45 66 46 HANDLE hThreadEvent; 67 DWORD threadHandler(DWORD fEvent); 68 69 HANDLE hThreadPoll; 47 70 HANDLE hThreadRead; 48 71 HANDLE hThreadWrite; … … 52 75 HANDLE hEventWrite; 53 76 77 LPOVERLAPPED_HANDLER lpReadHandler; 78 LPOVERLAPPED_HANDLER lpWriteHandler; 79 LPOVERLAPPED_HANDLER lpPollHandler; 80 81 CRITICAL_SECTION critsect; 82 54 83 //linked list of pending operations 55 84 LPOVERLAPPED pending; 56 85 86 87 friend DWORD CALLBACK OverlappedIOThread(LPVOID lpThreadParam); 57 88 }; 58 89
Note:
See TracChangeset
for help on using the changeset viewer.