Differences From Artifact [73fb41141f]:
- File
src/OFKernelEventObserver_epoll.m
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 5538) [annotate] [blame] [check-ins using]
To Artifact [7c101cdbc0]:
- File src/OFKernelEventObserver_epoll.m — part of check-in [cc4cb0d824] at 2017-05-02 21:10:33 on branch trunk — exceptions: Add nullability specifiers (user: js, size: 5628) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
47 48 49 50 51 52 53 | self = [super init]; @try { struct epoll_event event; #ifdef HAVE_EPOLL_CREATE1 if ((_epfd = epoll_create1(EPOLL_CLOEXEC)) == -1) | | > | > | > | 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 80 81 82 83 84 | self = [super init]; @try { struct epoll_event event; #ifdef HAVE_EPOLL_CREATE1 if ((_epfd = epoll_create1(EPOLL_CLOEXEC)) == -1) @throw [OFInitializationFailedException exceptionWithClass: [self class]]; #else int flags; if ((_epfd = epoll_create(1)) == -1) @throw [OFInitializationFailedException exceptionWithClass: [self class]]; if ((flags = fcntl(_epfd, F_GETFD, 0)) != -1) fcntl(_epfd, F_SETFD, flags | FD_CLOEXEC); #endif _FDToEvents = [[OFMapTable alloc] initWithKeyFunctions: mapFunctions objectFunctions: mapFunctions]; memset(&event, 0, sizeof(event)); event.events = EPOLLIN; event.data.ptr = [OFNull null]; if (epoll_ctl(_epfd, EPOLL_CTL_ADD, _cancelFD[0], &event) == -1) @throw [OFInitializationFailedException exceptionWithClass: [self class]]; } @catch (id e) { [self release]; @throw e; } return self; } |
︙ | ︙ |