History log of /freebsd-12.1/lib/libc/sys/kqueue.2 (Results 1 – 25 of 84)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0
# 95c05062 27-Jul-2018 David Bright <[email protected]>

Allow a EVFILT_TIMER kevent to be updated.

If a timer is updated (re-added) with a different time period
(specified in the .data field of the kevent), the new time period has
no effect; the timer wi

Allow a EVFILT_TIMER kevent to be updated.

If a timer is updated (re-added) with a different time period
(specified in the .data field of the kevent), the new time period has
no effect; the timer will not expire until the original time has
elapsed. This violates the documented behavior as the kqueue(2) man
page says (in part) "Re-adding an existing event will modify the
parameters of the original event, and not result in a duplicate
entry."

This modification, adapted from a patch submitted by cem@ to PR214987,
fixes the kqueue system to allow updating a timer entry. The
kevent timer behavior is changed to:

* When a timer is re-added, update the timer parameters to and
re-start the timer using the new parameters.
* Allow updating both active and already expired timers.
* When the timer has already expired, dequeue any undelivered events
and clear the count of expirations.

All of these changes address the original PR and also bring the
FreeBSD and macOS kevent timer behaviors into agreement.

A few other changes were made along the way:

* Update the kqueue(2) man page to reflect the new timer behavior.
* Fix man page style issues in kqueue(2) diagnosed by igor.
* Update the timer libkqueue system test to test for the updated
timer behavior.
* Fix the (test) libkqueue common.h file so that it includes
config.h which defines various HAVE_* feature defines, before the
#if tests for such variables in common.h. This enables the use of
the actual err(3) family of functions.
* Fix the usages of the err(3) functions in the tests for incorrect
type of variables. Those were formerly undiagnosed due to the
disablement of the err(3) functions (see previous bullet point).

PR: 214987
Reported by: Brian Wellington <[email protected]>
Reviewed by: kib
MFC after: 1 week
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D15778

show more ...


Revision tags: release/11.2.0
# 837fe325 28-Dec-2017 Eitan Adler <[email protected]>

Fix a few more speelling errors

Reviewed by: bjk
Reviewed by: jilles (incl formal "accept")
Differential Revision: https://reviews.freebsd.org/D13650


# 9e6e05e4 07-Dec-2017 Benjamin Kaduk <[email protected]>

Note that old sys/event.h required manual sys/types.h inclusion

ed fixed this in r313704 but older versions are still affected.


Revision tags: release/10.4.0, release/11.1.0
# 09986d3b 23-Jun-2017 Alan Somers <[email protected]>

Clarify usage of aio(4) with kqueue(2)

Reviewed by: jhb
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D11299


# 2b34e843 17-Jun-2017 Konstantin Belousov <[email protected]>

Add abstime kqueue(2) timers and expand struct kevent members.

This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which
specifies that the data field contains absolute time to fire the
event

Add abstime kqueue(2) timers and expand struct kevent members.

This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which
specifies that the data field contains absolute time to fire the
event.

To make this useful, data member of the struct kevent must be extended
to 64bit. Using the opportunity, I also added ext members. This
changes struct kevent almost to Apple struct kevent64, except I did
not changed type of ident and udata, the later would cause serious API
incompatibilities.

The type of ident was kept uintptr_t since EVFILT_AIO returns a
pointer in this field, and e.g. CHERI is sensitive to the type
(discussed with brooks, jhb).

Unlike Apple kevent64, symbol versioning allows us to claim ABI
compatibility and still name the new syscall kevent(2). Compat shims
are provided for both host native and compat32.

Requested by: bapt
Reviewed by: bapt, brooks, ngie (previous version)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D11025

show more ...


# d60fa657 16-Jun-2017 Konstantin Belousov <[email protected]>

Move the description of kern.kq_calloutmax sysctl into a new paragraph
for better presentation.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days


# 17c847c1 16-Jun-2017 Konstantin Belousov <[email protected]>

Start a new sentence on the new line.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days


# b11ef6e9 18-Apr-2017 Sergey Kandaurov <[email protected]>

Document kevent EVFILT_EMPTY.

Reviewed by: hiren
X-MFC with: r312277


# 8eb15797 16-Feb-2017 Ed Schouten <[email protected]>

Remove unnecessary #includes from the kqueue(2) man page.

Now that <sys/event.h> can be included on its own, adjust the manual
page accordingly. Remove both unnecessary #include statements from the

Remove unnecessary #includes from the kqueue(2) man page.

Now that <sys/event.h> can be included on its own, adjust the manual
page accordingly. Remove both unnecessary #include statements from the
synopsis and the example code.

While there, also add a note to the BUGS section to mention that
previous versions of this header file still depend on <sys/types.h>.

Reviewed by: ngie, vangyzen
Differential Revision: https://reviews.freebsd.org/D9605

show more ...


# 3617efe5 06-Oct-2016 Bryan Drewery <[email protected]>

Improve grammar.

MFC after: 1 week
Sponsored by: Dell EMC Isilon


Revision tags: release/11.0.1, release/11.0.0
# 6e745eed 03-May-2016 Konstantin Belousov <[email protected]>

Correct wording.

Submitted by: David A. Bright
MFC after: 2 weeks


# c89e1b87 03-May-2016 Konstantin Belousov <[email protected]>

Add EVFILT_VNODE open, read and close notifications.

While there, order EVFILT_VNODE notes descriptions alphabetically.

Based on submission, and tested by: Vladimir Kondratyev <[email protected]>
MF

Add EVFILT_VNODE open, read and close notifications.

While there, order EVFILT_VNODE notes descriptions alphabetically.

Based on submission, and tested by: Vladimir Kondratyev <[email protected]>
MFC after: 2 weeks

show more ...


# f7b71c8a 02-May-2016 Konstantin Belousov <[email protected]>

Issue NOTE_EXTEND when a directory entry is added to or removed from
the monitored directory as the result of rename(2) operation. The
renames staying in the directory are not reported.

Submitted b

Issue NOTE_EXTEND when a directory entry is added to or removed from
the monitored directory as the result of rename(2) operation. The
renames staying in the directory are not reported.

Submitted by: Vladimir Kondratyev <[email protected]>
MFC after: 2 weeks

show more ...


# ba55e112 01-May-2016 Konstantin Belousov <[email protected]>

As a reader service, explain NOTE_LINK reporting for the directories.

Submitted by: Vladimir Kondratyev <[email protected]>
MFC after: 1 week


# 8c231786 01-May-2016 Benedict Reuschling <[email protected]>

Provide an example to the kqueue man page, showing
a basic usage example. Although it is an
untypical example for the use of kqueue, it is
better than nothing and should get people started.

PR: 1

Provide an example to the kqueue man page, showing
a basic usage example. Although it is an
untypical example for the use of kqueue, it is
better than nothing and should get people started.

PR: 196844
Submitted by: [email protected]
Reviewed by: kib
Approved by: kib
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D6082

show more ...


Revision tags: release/10.3.0, release/10.2.0
# 2433a4eb 05-Aug-2015 Ed Schouten <[email protected]>

Make it possible to implement poll(2) on top of kqueue(2).

It looks like EVFILT_READ and EVFILT_WRITE trigger under the same
conditions as poll()'s POLLRDNORM and POLLWRNORM as described by POSIX.
T

Make it possible to implement poll(2) on top of kqueue(2).

It looks like EVFILT_READ and EVFILT_WRITE trigger under the same
conditions as poll()'s POLLRDNORM and POLLWRNORM as described by POSIX.
The only difference is that POLLRDNORM has to be triggered on regular
files unconditionally, whereas EVFILT_READ only triggers when not EOF.

Introduce a new flag, NOTE_FILE_POLL, that can be used to make
EVFILT_READ and EVFILT_WRITE behave identically to poll(). This flag
will be used by cloudlibc's poll() function.

Reviewed by: jmg
Differential Revision: https://reviews.freebsd.org/D3303

show more ...


# b072e86d 29-Mar-2015 Konstantin Belousov <[email protected]>

Make kevent(2) a cancellation point.

Note that to cancel blocked kevent(2) call, changelist must be empty,
since we cannot cancel a call which already made changes to the
process state. And in reve

Make kevent(2) a cancellation point.

Note that to cancel blocked kevent(2) call, changelist must be empty,
since we cannot cancel a call which already made changes to the
process state. And in reverse, call which only makes changes to the
kqueue state, without waiting for an event, is not cancellable. This
makes a natural usage model to migrate kqueue loop to support
cancellation, where existing single kevent(2) call must be split into
two: first uncancellable update of kqueue, then cancellable wait for
events.

Note that this is ABI-incompatible change, but it is believed that
there is no cancel-safe code that relies on kevent(2) not being a
cancellation point. Option to preserve the ABI would be to keep
kevent(2) as is, but add new call with flags to specify cancellation
behaviour, which only value seems to add complications.

Suggested and reviewed by: jilles
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

show more ...


# 19eaed53 15-Dec-2014 Konstantin Belousov <[email protected]>

Markup fixes for kqueue(2), no content changes.

Reviewed by: brueffer (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days


Revision tags: release/10.1.0
# cfaa96f3 09-Sep-2014 Joel Dahl <[email protected]>

Minor mdoc nit.


# 42e62eca 18-Jul-2014 Baptiste Daroussin <[email protected]>

Extend kqueue's EVFILT_TIMER by adding precision unit flags support

Define the precision macros as bits sets to conform with XNU equivalent.
Test fflags passed for EVFILT_TIMER and return EINVAL in

Extend kqueue's EVFILT_TIMER by adding precision unit flags support

Define the precision macros as bits sets to conform with XNU equivalent.
Test fflags passed for EVFILT_TIMER and return EINVAL in case an invalid flag
is passed.

Phabric: https://phabric.freebsd.org/D421
Reviewed by: kib

show more ...


Revision tags: release/9.3.0
# 8fbf3d50 23-Jun-2014 Baptiste Daroussin <[email protected]>

use .Mt to mark up email addresses consistently (part4)

PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>


# f56cfe8d 07-Apr-2014 Ed Schouten <[email protected]>

Fix table alignment. EVFILT_PROCDESC is longer than the existing filters.


# 38219d6a 07-Apr-2014 Ed Schouten <[email protected]>

Implement kqueue(2) for procdesc(4).

kqueue(2) already supports EVFILT_PROC. Add an EVFILT_PROCDESC that
behaves the same, but operates on a procdesc(4) instead. Only implement
NOTE_EXIT for now. Th

Implement kqueue(2) for procdesc(4).

kqueue(2) already supports EVFILT_PROC. Add an EVFILT_PROCDESC that
behaves the same, but operates on a procdesc(4) instead. Only implement
NOTE_EXIT for now. The nice thing about NOTE_EXIT is that it also
returns the exit status of the process, meaning that we can now obtain
this value, even if pdwait4(2) is still unimplemented.

Notes:

- Simply reuse EVFILT_NETDEV for EVFILT_PROCDESC. As both of these will
be used on totally different descriptor types, this should not clash.

- Let procdesc_kqops_event() reuse the same structure as filt_proc().
The only difference is that procdesc_kqops_event() should also be able
to deal with the case where the process was already terminated after
registration. Simply test this when hint == 0.

- Fix some style(9) issues in filt_proc() to keep it consistent with the
newly added procdesc_kqops_event().

- Save the exit status of the process in pd->pd_xstat, as we cannot pick
up the proctree_lock from within procdesc_kqops_event().

Discussed on: arch@
Reviewed by: kib@

show more ...


Revision tags: release/10.0.0
# 1947c8a6 03-Nov-2013 Jilles Tjoelker <[email protected]>

kqueue: Change error for kqueues rlimit from EMFILE to ENOMEM and document
this error condition in the kqueue(2) manual page.

Discussed with: kib


Revision tags: release/9.2.0
# 513bfc4f 25-Jul-2013 John Baldwin <[email protected]>

Enhance the description of NOTE_TRACK:
- NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid.
If NOTE_FORK is set, the listener will get a NOTE_FORK event from
the parent pid, b

Enhance the description of NOTE_TRACK:
- NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid.
If NOTE_FORK is set, the listener will get a NOTE_FORK event from
the parent pid, but not a separate NOTE_TRACK event.
- Explicitly note that the event added to monitor the child process
preserves the fflags from the original event.
- Move the description of NOTE_TRACKERR under NOTE_TRACK as it is not a
bit for the user to set (which is what this list pupports to be).
Also, explicitly note that if an error occurs, the NOTE_CHILD event
will not be generated.

MFC after: 1 week

show more ...


1234