Overview
Comment: | Make -[OFKernelEventObserver cancel] work on Amiga |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8941b1d97487e07507cd967957d79d6d |
User & Date: | js on 2019-08-31 17:13:09 |
Other Links: | manifest | tags |
Context
2019-09-01
| ||
12:50 | {condition,mutex,thread}.m: Set errno on error check-in: d7fd999fee user: js tags: trunk | |
2019-08-31
| ||
17:13 | Make -[OFKernelEventObserver cancel] work on Amiga check-in: 8941b1d974 user: js tags: trunk | |
16:20 | Fix order in a few headers check-in: c756e51a93 user: js tags: trunk | |
Changes
Modified src/OFKernelEventObserver.h from [860be5ffa7] to [97255f4a8b].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + + + + + | */ #import "OFObject.h" #ifdef OF_HAVE_SOCKETS # import "socket.h" #endif #ifdef OF_AMIGAOS # include <exec/types.h> # include <exec/tasks.h> #endif OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); @class OFDate; #ifdef OF_HAVE_THREADS @class OFMutex; |
︙ | |||
115 116 117 118 119 120 121 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | - + + + + | @interface OFKernelEventObserver: OFObject { OFMutableArray OF_GENERIC(id <OFReadyForReadingObserving>) *_readObjects; OFMutableArray OF_GENERIC(id <OFReadyForWritingObserving>) *_writeObjects; id <OFKernelEventObserverDelegate> _Nullable _delegate; |
︙ |
Modified src/OFKernelEventObserver.m from [6f6bd90234] to [d45077c20a].
︙ | |||
51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + + + + | #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" #import "socket.h" #import "socket_helpers.h" #ifdef OF_AMIGAOS # include <proto/exec.h> #endif enum { QUEUE_ADD = 0, QUEUE_REMOVE = 1, QUEUE_READ = 0, QUEUE_WRITE = 2 }; #define QUEUE_ACTION (QUEUE_ADD | QUEUE_REMOVE) |
︙ | |||
103 104 105 106 107 108 109 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + + - + - + | } - (instancetype)init { self = [super init]; @try { |
︙ | |||
179 180 181 182 183 184 185 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + - + | } return self; } - (void)dealloc { |
︙ | |||
415 416 417 418 419 420 421 | 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | - + + + + + + + + + + | - (void)observeUntilDate: (OFDate *)date { [self observeForTimeInterval: date.timeIntervalSinceNow]; } - (void)cancel { |
Modified src/OFSelectKernelEventObserver.m from [b202b955cf] to [c4217fefce].
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 | 38 39 40 41 42 43 44 45 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 72 73 74 75 76 77 78 79 | + + + + + + + - + - + + | #import "OFKernelEventObserver.h" #import "OFInitializationFailedException.h" #import "OFObserveFailedException.h" #import "OFOutOfRangeException.h" #import "socket_helpers.h" #ifdef OF_AMIGAOS # include <proto/exec.h> #endif @implementation OFSelectKernelEventObserver - (instancetype)init { self = [super init]; #ifdef OF_AMIGAOS _maxFD = 0; #else |
︙ | |||
140 141 142 143 144 145 146 | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - + | { id const *objects; fd_set readFDs; fd_set writeFDs; struct timeval timeout; int events; #ifdef OF_AMIGAOS |
︙ | |||
171 172 173 174 175 176 177 | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | + + + + - + + + + + + + + + + + + + + - + - - + - + - + + | timeout.tv_sec = (time_t)timeInterval; #else timeout.tv_sec = (long)timeInterval; #endif timeout.tv_usec = (int)lrint((timeInterval - timeout.tv_sec) * 1000); #ifdef OF_AMIGAOS if ((cancelSignal = AllocSignal(-1)) == (ULONG)-1) @throw [OFObserveFailedException exceptionWithObserver: self errNo: EAGAIN]; |
︙ |