Page MenuHomeFreeBSD

kqueue: add EV_KEEPUDATA flag
ClosedPublic

Authored by freebsdphab-AX9_cmx.ietfng.org on May 16 2021, 12:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 28, 8:13 PM
Unknown Object (File)
Mon, Sep 28, 8:00 PM
Unknown Object (File)
Mon, Sep 28, 4:25 AM
Unknown Object (File)
Sun, Sep 27, 3:31 PM
Unknown Object (File)
Fri, Sep 11, 1:01 PM
Unknown Object (File)
Aug 30 2026, 11:07 AM
Unknown Object (File)
Aug 29 2026, 2:00 AM
Unknown Object (File)
Aug 28 2026, 3:57 PM

Details

Summary

This allows us to, for example, NOTE_TRIGGER or EV_{EN,DIS}ABLE events without overwriting the stashed pointer.

Test Plan

Manual verification of EV_KEEPUDATA behavior, new test functions

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I've been using this locally and found it *extremely* useful, and frankly was quite surprised when I found out that EV_ENABLE/EV_DISABLE trashed udata originally.

I think the only thing that would be nice to add in addition are some tests for this. Probably best for that to add a new "native" test binary in tests/sys/kqueue instead of shoe-horning this into the NetBSD tests.

@jhb Any chance you could push this? I've been using this for months and it's worked well for me.

This revision is now accepted and ready to land.Sep 4 2021, 10:51 PM
This revision was automatically updated to reflect the committed changes.