Differences From Artifact [63c9f7d74b]:
- File src/OFSelectKernelEventObserver.m — part of check-in [208285040f] at 2020-11-29 02:21:31 on branch trunk — Fix a few places using msec instead of usec (user: js, size: 6428) [annotate] [blame] [check-ins using]
To Artifact [73642ffd8c]:
- File
src/OFSelectKernelEventObserver.m
— part of check-in
[4504bd4141]
at
2020-11-29 04:02:42
on branch trunk
— OFSelectKernelEventObserver: Move FD_ZERO
It was inside the #ifdef, so not being done on AmigaOS. (user: js, size: 6434) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | @implementation OFSelectKernelEventObserver - (instancetype)init { self = [super init]; @try { #ifdef OF_AMIGAOS _maxFD = 0; #else # ifndef OF_WINDOWS if (_cancelFD[0] >= (int)FD_SETSIZE) @throw [OFInitializationFailedException exceptionWithClass: self.class]; # endif | > > > < < | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | @implementation OFSelectKernelEventObserver - (instancetype)init { self = [super init]; @try { FD_ZERO(&_readFDs); FD_ZERO(&_writeFDs); #ifdef OF_AMIGAOS _maxFD = 0; #else # ifndef OF_WINDOWS if (_cancelFD[0] >= (int)FD_SETSIZE) @throw [OFInitializationFailedException exceptionWithClass: self.class]; # endif FD_SET(_cancelFD[0], &_readFDs); if (_cancelFD[0] > INT_MAX) @throw [OFOutOfRangeException exception]; _maxFD = (int)_cancelFD[0]; #endif |
︙ | ︙ | |||
168 169 170 171 172 173 174 | - (void)observeForTimeInterval: (of_time_interval_t)timeInterval { fd_set readFDs; fd_set writeFDs; struct timeval timeout; int events; #ifdef OF_AMIGAOS | > | | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - (void)observeForTimeInterval: (of_time_interval_t)timeInterval { fd_set readFDs; fd_set writeFDs; struct timeval timeout; int events; #ifdef OF_AMIGAOS BYTE cancelSignal; ULONG execSignalMask; #endif void *pool; if ([self of_processReadBuffers]) return; #ifdef FD_COPY |
︙ | ︙ | |||
197 198 199 200 201 202 203 | timeout.tv_sec = (time_t)timeInterval; #else timeout.tv_sec = (long)timeInterval; #endif timeout.tv_usec = (int)((timeInterval - timeout.tv_sec) * 1000000); #ifdef OF_AMIGAOS | | | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | timeout.tv_sec = (time_t)timeInterval; #else timeout.tv_sec = (long)timeInterval; #endif timeout.tv_usec = (int)((timeInterval - timeout.tv_sec) * 1000000); #ifdef OF_AMIGAOS if ((cancelSignal = AllocSignal(-1)) == (BYTE)-1) @throw [OFObserveFailedException exceptionWithObserver: self errNo: EAGAIN]; execSignalMask = _execSignalMask | (1ul << cancelSignal); Forbid(); |
︙ | ︙ |