Differences From Artifact [ef6117c8da]:
- File src/OFKqueueKernelEventObserver.m — part of check-in [80ccb46fc4] at 2022-09-24 16:49:50 on branch trunk — Rename OFObserve{ -> KernelEvents}FailedException (user: js, size: 5376) [annotate] [blame] [check-ins using] [more...]
To Artifact [12f411060e]:
- File
src/OFKqueueKernelEventObserver.m
— part of check-in
[c86b8f10f0]
at
2022-11-16 01:27:26
on branch trunk
— Add OFAssert()
This uses the same format as OFEnsure(). (user: js, size: 5360) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
11 12 13 14 15 16 17 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" | < | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #include <errno.h> #ifdef HAVE_FCNTL_H # include <fcntl.h> #endif #include "unistd_wrapper.h" |
︙ | ︙ | |||
184 185 186 187 188 189 190 | @throw [OFObserveKernelEventsFailedException exceptionWithObserver: self errNo: (int)eventList[i].data]; if (eventList[i].ident == (uintptr_t)_cancelFD[0]) { char buffer; | | | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | @throw [OFObserveKernelEventsFailedException exceptionWithObserver: self errNo: (int)eventList[i].data]; if (eventList[i].ident == (uintptr_t)_cancelFD[0]) { char buffer; OFAssert(eventList[i].filter == EVFILT_READ); OFEnsure(read(_cancelFD[0], &buffer, 1) == 1); continue; } pool = objc_autoreleasePoolPush(); |
︙ | ︙ | |||
206 207 208 209 210 211 212 | case EVFILT_WRITE: if ([_delegate respondsToSelector: @selector(objectIsReadyForWriting:)]) [_delegate objectIsReadyForWriting: (id)eventList[i].udata]; break; default: | | | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | case EVFILT_WRITE: if ([_delegate respondsToSelector: @selector(objectIsReadyForWriting:)]) [_delegate objectIsReadyForWriting: (id)eventList[i].udata]; break; default: OFAssert(0); } objc_autoreleasePoolPop(pool); } } @end |