diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2014-04-02 08:22:12 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2014-04-02 08:22:12 (GMT) |
commit | 551a220b1fa1adca0dee1fafdf4e1c5f209cb49a (patch) | |
tree | f9b50a30394144ac5298d505d65ef98f4567b046 /win/tclWinSock.c | |
parent | 2e6d32b5a8342e23eb875567e71edc8061683f88 (diff) | |
download | tcl-551a220b1fa1adca0dee1fafdf4e1c5f209cb49a.zip tcl-551a220b1fa1adca0dee1fafdf4e1c5f209cb49a.tar.gz tcl-551a220b1fa1adca0dee1fafdf4e1c5f209cb49a.tar.bz2 |
Marked all communication variables which are set by notifier thread with "volatile".
Diffstat (limited to 'win/tclWinSock.c')
-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 |