Differences From Artifact [5c00bd3414]:
- File
src/OFKernelEventObserver_poll.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: 4689) [annotate] [blame] [check-ins using]
To Artifact [d87bf7dc93]:
- File
src/OFKernelEventObserver_poll.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 4689) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
66 67 68 69 70 71 72 | - (void)dealloc { [_FDs release]; [super dealloc]; } | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - (void)dealloc { [_FDs release]; [super dealloc]; } - (void)of_addObject: (id)object fileDescriptor: (int)fd events: (short)events { struct pollfd *FDs = [_FDs items]; size_t count = [_FDs count]; bool found = false; |
︙ | ︙ | |||
97 98 99 100 101 102 103 | } _FDToObject[fd] = object; [_FDs addItem: &p]; } } | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | } _FDToObject[fd] = object; [_FDs addItem: &p]; } } - (void)of_removeObject: (id)object fileDescriptor: (int)fd events: (short)events { struct pollfd *FDs = [_FDs items]; size_t nFDs = [_FDs count]; for (size_t i = 0; i < nFDs; i++) { |
︙ | ︙ | |||
121 122 123 124 125 126 127 | } break; } } } | | | | | | | | | | | | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | } break; } } } - (void)of_addObjectForReading: (id <OFReadyForReadingObserving>)object { [self of_addObject: object fileDescriptor: [object fileDescriptorForReading] events: POLLIN]; } - (void)of_addObjectForWriting: (id <OFReadyForWritingObserving>)object { [self of_addObject: object fileDescriptor: [object fileDescriptorForWriting] events: POLLOUT]; } - (void)of_removeObjectForReading: (id <OFReadyForReadingObserving>)object { [self of_removeObject: object fileDescriptor: [object fileDescriptorForReading] events: POLLIN]; } - (void)of_removeObjectForWriting: (id <OFReadyForWritingObserving>)object { [self of_removeObject: object fileDescriptor: [object fileDescriptorForWriting] events: POLLOUT]; } - (void)observeForTimeInterval: (of_time_interval_t)timeInterval { struct pollfd *FDs; int events; size_t nFDs; [self of_processQueue]; if ([self of_processReadBuffers]) return; FDs = [_FDs items]; nFDs = [_FDs count]; #ifdef OPEN_MAX if (nFDs > OPEN_MAX) |
︙ | ︙ |