diff options
| author | harald.oehlmann@elmicron.de <oehhar> | 2014-04-02 08:22:12 (GMT) | 
|---|---|---|
| committer | harald.oehlmann@elmicron.de <oehhar> | 2014-04-02 08:22:12 (GMT) | 
| commit | cfa286e0dffe678e3e9ed9ab0dc52e57faf3da88 (patch) | |
| tree | f9b50a30394144ac5298d505d65ef98f4567b046 | |
| parent | 91e444426eb3e47500122f192094e6edb146c0d7 (diff) | |
| download | tcl-cfa286e0dffe678e3e9ed9ab0dc52e57faf3da88.zip tcl-cfa286e0dffe678e3e9ed9ab0dc52e57faf3da88.tar.gz tcl-cfa286e0dffe678e3e9ed9ab0dc52e57faf3da88.tar.bz2  | |
Marked all communication variables which are set by notifier thread with "volatile".
| -rw-r--r-- | win/tclWinSock.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 1b252e0..036f3b9 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -146,7 +146,7 @@ struct TcpState {      int watchEvents;		/* OR'ed combination of FD_READ, FD_WRITE,  				 * FD_CLOSE, FD_ACCEPT and FD_CONNECT that  				 * indicate which events are interesting. */ -    int readyEvents;		/* OR'ed combination of FD_READ, FD_WRITE, +    volatile int readyEvents;	/* OR'ed combination of FD_READ, FD_WRITE,  				 * FD_CLOSE, FD_ACCEPT and FD_CONNECT that  				 * indicate which events have occurred.  				 * Set by notifier thread, access must be @@ -155,7 +155,8 @@ struct TcpState {  				 * FD_CLOSE, FD_ACCEPT and FD_CONNECT that  				 * indicate which events are currently being  				 * selected. */ -    int acceptEventCount;	/* Count of the current number of FD_ACCEPTs +    volatile int acceptEventCount; +				/* Count of the current number of FD_ACCEPTs  				 * that have arrived and not yet processed.  				 * Set by notifier thread, access must be  				 * protected by semaphore */ @@ -173,7 +174,7 @@ struct TcpState {      struct addrinfo *myaddr;	/* Iterator over myaddrlist. */      int status;                 /* Cache status of async socket. */      int cachedBlocking;         /* Cache blocking mode of async socket. */ -    int connectError;		/* Async connect error set by notifier thread. +    volatile int connectError;	/* Async connect error set by notifier thread.  				 * Set by notifier thread, access must be  				 * protected by semaphore */      struct TcpState *nextPtr;	/* The next socket on the per-thread socket  | 
