ObjFW  History of src/OFKernelEventObserver_epoll.m of 2f4e0df8be4b4750

History of the file that is called src/OFKernelEventObserver_epoll.m at check-in 2f4e0df8be4b4750

2019-06-17
02:33
Deleted: Remove underscores from class names check-in: [17d57e01ff] user: js, branch: trunk, size: 0
2019-03-08
00:35
Use dot syntax file: [c7d873c63a] check-in: [bceb7ed4c9] user: js, branch: trunk, size: 5700 [annotate] [blame] [check-ins using] [diff]
2019-01-03
19:13
Update copyright file: [0ecb9c1ccd] check-in: [0509d7a844] user: js, branch: trunk, size: 5714 [annotate] [blame] [check-ins using] [diff]
2018-01-03
19:49
Update copyright notice file: [a3a88889d8] check-in: [7e5c81e186] user: js, branch: trunk, size: 5708 [annotate] [blame] [check-ins using] [diff]
2017-10-17
00:33
Do not use implicit method return types

Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. file: [8df1c9cf76] check-in: [2f4e0df8be] user: js, branch: trunk, size: 5685 [annotate] [blame] [check-ins using] [diff]

2017-05-27
10:33
Add unistd.h wrapper to make things less horrible file: [72b75e858f] check-in: [d31ec806ef] user: js, branch: trunk, size: 5671 [annotate] [blame] [check-ins using] [diff]
10:08
Make things work with glibc 2.17 and Clang 3.4.2 file: [80e980fa67] check-in: [ec36a82d68] user: js, branch: trunk, size: 5835 [annotate] [blame] [check-ins using] [diff]
2017-05-22
23:31
Make includes of unistd.h and fcntl.h conditional file: [5e58174b96] check-in: [1287e77e04] user: js, branch: trunk, size: 5692 [annotate] [blame] [check-ins using] [diff]
2017-05-21
21:28
Prefix private methods with of_ instead of OF_

This matches Apple's style. file: [e75e01d402] check-in: [6b77a5dd8b] user: js, branch: trunk, size: 5635 [annotate] [blame] [check-ins using] [diff]

2017-05-07
20:10
Small code style change

Casts are now written like types in variable declarations. file: [662ee50aca] check-in: [4af49a13c3] user: js, branch: trunk, size: 5635 [annotate] [blame] [check-ins using] [diff]

2017-05-02
21:10
exceptions: Add nullability specifiers file: [7c101cdbc0] check-in: [cc4cb0d824] user: js, branch: trunk, size: 5628 [annotate] [blame] [check-ins using] [diff]
2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [73fb41141f] check-in: [44f45c2e35] user: js, branch: trunk, size: 5538 [annotate] [blame] [check-ins using] [diff]

2016-06-04
18:49
OFMapTable: Rename valueForKey to objectForKey

The reason for this is that -[valueForKey:] could be confused with
Key Value Coding. file: [345a2363cb] check-in: [1ba9c051a6] user: js, branch: trunk, size: 5532 [annotate] [blame] [check-ins using] [diff]

2016-04-24
16:57
OFKernelEventObserver_epoll: Use fd + 1 as key

OFMapTable does not allow using 0 for the key, but stdin has file
descriptor 0. file: [f5a39990c0] check-in: [2c3910e9fd] user: js, branch: trunk, size: 5529 [annotate] [blame] [check-ins using] [diff]

2016-03-20
14:19
Use the locked queue for kqueue and epoll as well

_readObjects must only be changed from the thread running the observer
and not from a thread adding or removing objects to observe. This is
already handled by the locked queue used by poll and select, so the best
way to solve this is to use the locked queue for kqueue and epoll as
well. file: [3e6c82710c] check-in: [85917ea0dd] user: js, branch: 0.8, size: 5498 [annotate] [blame] [check-ins using] [diff]

14:07
Use the locked queue for kqueue and epoll as well

_readObjects must only be changed from the thread running the observer
and not from a thread adding or removing objects to observe. This is
already handled by the locked queue used by poll and select, so the best
way to solve this is to use the locked queue for kqueue and epoll as
well. file: [d65aafd84c] check-in: [45518ae7b7] user: js, branch: trunk, size: 5499 [annotate] [blame] [check-ins using] [diff]

12:05
Never block when the read buffer is non-empty

This was broken by 88f2f03. The problem only existed when something was
in the read buffer, but not processed completely, as after processing
the read buffer, it would go on to wait for data - but since not the
entire read buffer had been processed, it meant there was still data
left there that needed to be handled first. file: [f08643e4a0] check-in: [b84490ab4f] user: js, branch: 0.8, size: 6113 [annotate] [blame] [check-ins using] [diff]

11:57
Never block when the read buffer is non-empty

This was broken by 88f2f03. The problem only existed when something was
in the read buffer, but not processed completely, as after processing
the read buffer, it would go on to wait for data - but since not the
entire read buffer had been processed, it meant there was still data
left there that needed to be handled first. file: [ccbb902e19] check-in: [7ae17af9f0] user: js, branch: trunk, size: 6114 [annotate] [blame] [check-ins using] [diff]

2016-02-21
15:37
Make use of C99-style for loops file: [dd16d51752] check-in: [e0b9167693] user: js, branch: trunk, size: 6175 [annotate] [blame] [check-ins using] [diff]
2016-01-03
00:41
Update copyright

While at it, also update the mail address. file: [1081329583] check-in: [2a27cf3000] user: js, branch: trunk, size: 6174 [annotate] [blame] [check-ins using] [diff]

00:35
Fix a regression from the previous refactorization

kqueue and epoll were not updating _readObjects and _writeObjects
anymore, since this was done by the queue handling code, which they no
longer use after the refactorization. file: [e19549d9cb] check-in: [258b8a4944] user: js, branch: trunk, size: 6170 [annotate] [blame] [check-ins using] [diff]

2015-12-29
21:33
Refactor OFKernelEventObserver

This moves the locked queue for actions to
OFKernelEventObserver_LockedQueue, which is now used for select and
poll, but skipped for kqueue and epoll, as they natively support changes
from another thread.

This fixes the problem that removing an object is delayed until the next
observe call - at which point it might have already been closed, meaning
the fd is no longer available. This was mainly a problem with kqueue, as
closing the fd already removed it from the kqueue, which then resulted
in an error being returned when trying to manually remove the fd from
the kqueue. file: [02fb70080b] check-in: [e9b4700cb6] user: js, branch: trunk, size: 5811 [annotate] [blame] [check-ins using] [diff]

2015-05-09
21:38
OFKernelEventObserver_epoll: Fix a typo file: [48f0674f49] check-in: [dbbb4c7200] user: js, branch: trunk, size: 5754 [annotate] [blame] [check-ins using] [diff]
18:13
More OFKernelEventObserver refactoring

This was necessary because select(), poll() and kevent() on FreeBSD and
OS X would sometimes return 0 events, even if there are some, and
sometimes return the correct number of events that were pending, meaning
the number of events returned is unreliable. To make things worse,
whether it returns 0 or the number of events that were pending is
completely non-deterministic on both FreeBSD and OS X (running the same
tests multiple times in a row would make it sometimes work and sometimes
fail).

In order to prevent code from depending on the return value of
-[observeForTimeInterval:] (which would depend on select(), poll() and
kevent() returning the correct number), OFKernelObserver no longer
returns whether there were pending events. It is expected that
-[observe] or -[observeForTimeInterval:] is just called in a loop as
long as events should be handled.

The tests have been changed as well to reflect this. What they do now is
set a deadline and call -[observeForTimeInterval:] with a small timeout
in a loop until the deadline is reached or all events have been handled.

Note: DragonFlyBSD has not been tested, but will most likely behave like
FreeBSD and OS X. file: [8f646c7ee8] check-in: [220513a3f5] user: js, branch: trunk, size: 5754 [annotate] [blame] [check-ins using] [diff]

2015-05-04
20:34
Refactor OFKernelEventObserver file: [463d24baf5] check-in: [bbe4040126] user: js, branch: trunk, size: 5953 [annotate] [blame] [check-ins using] [diff]
14:30
Added: Add OFKernelEventObserver_epoll file: [b4f29b6ca3] check-in: [ed4a6f396b] user: js, branch: trunk, size: 5492 [annotate] [blame] [check-ins using]