Differences From Artifact [4a4c51ed64]:
- File
src/OFKernelEventObserver_poll.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 4563) [annotate] [blame] [check-ins using]
To Artifact [bb3d801549]:
- File src/OFKernelEventObserver_poll.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 4575) [annotate] [blame] [check-ins using]
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + - + | } - (void)OF_addObject: (id)object fileDescriptor: (int)fd events: (short)events { struct pollfd *FDs = [_FDs items]; |
︙ | |||
102 103 104 105 106 107 108 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - + - + | } - (void)OF_removeObject: (id)object fileDescriptor: (int)fd events: (short)events { struct pollfd *FDs = [_FDs items]; |
︙ | |||
158 159 160 161 162 163 164 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + | } - (void)observeForTimeInterval: (of_time_interval_t)timeInterval { void *pool = objc_autoreleasePoolPush(); struct pollfd *FDs; int events; |
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - + | events = poll(FDs, (nfds_t)nFDs, (int)(timeInterval != -1 ? timeInterval * 1000 : -1)); if (events < 0) @throw [OFObserveFailedException exceptionWithObserver: self errNo: errno]; |
︙ |