Commit Graph

60 Commits

Author SHA1 Message Date
wiz 6805bcc8e7 Fix some macro( usage)s 2023-07-28 23:41:16 +00:00
christos d11110f473 Add epoll(2) from Theodore Preduta as part of GSoC 2023 2023-07-28 18:18:59 +00:00
pgoyette b88e5267f2 Fix typo 2022-02-13 16:51:56 +00:00
thorpej d5b8844629 Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty.  This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver.  Compatible
with the same filter in FreeBSD.
2021-10-23 01:28:33 +00:00
thorpej 56265c7c8b Oops, forgot to note the history of NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE,
and NOTE_READ.
2021-10-20 03:26:20 +00:00
thorpej 982ae832c3 Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
2021-10-20 03:08:16 +00:00
thorpej dbceac44db Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER,
API-compatible with the same in FreeBSD.
2021-10-13 04:57:19 +00:00
christos 2987e709e6 add missing sentence. 2020-10-31 14:35:28 +00:00
wiz 1848228ba3 Remove trailing whitespace. 2020-10-31 10:51:59 +00:00
christos ed75ee8266 PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2) 2020-10-31 01:08:31 +00:00
kamil cd653c6e17 Explain in kevent(2) the semantics of EINTR
All changes contained in the changelist are applied before returning this
error.
2019-12-23 01:46:09 +00:00
kamil e6ecafaf7d Document udata type switch in struct kevent in the kqueue(2) 2019-12-22 17:01:15 +00:00
abhinav 2373d24da1 Markup improvements: use Dv for kqueue filters, events and note names
ok wiz@
2019-04-12 10:57:27 +00:00
christos b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
kamil da61917c5f EV_SET(2) - simplify description
Note only the information that it does not evaluate multiple times its
parameters.

Suggested by <wiz>.
2017-06-07 20:54:59 +00:00
abhinav 46dffe54d1 s/filesystem/file system/
Thanks to Thomas for pointing out that in NetBSD man pages we try to use the convention of writing it
as "file system".
2017-06-07 05:26:19 +00:00
abhinav 1a8ce3a63b Bump date for previous
Fix typo: fileystem -> filesystem
2017-06-06 20:12:54 +00:00
kamil bc0c5fd82b Update the EV_SET() description with newer implementation.
EV_SET(2) is a macro again, that wraps an inline function which is still
new in NetBSD 8.0.

Sponsored by <The NetBSD Foundation>
2017-06-06 17:01:59 +00:00
kamil 5f91e65caa Document transition of EV_SET() from a macro to a static inline function
Sponsored by <The NetBSD Foundation>
2017-05-31 01:03:01 +00:00
abhinav bf08a0975f Use more markup for `struct timespec`
Use Xr to refer to timespec(3)
Add timespec(3) to SEE ALSO
2017-04-11 17:59:23 +00:00
abhinav 3b14f403c3 s/Sets/Set: Use style consistent with the other sentences in that list.
Add .Pp before next sentence.
2017-04-11 11:06:39 +00:00
abhinav 8e077e469b Fix sentence. 2017-04-02 14:27:11 +00:00
abhinav 8e39d64647 Add EV_SET() to the NAME section
Use Xr instead of Fn to refer other man pages
Add some more entries to SEE ALSO

Reviewed by wiz@
2017-04-01 14:20:45 +00:00
abhinav af4d0016d3 Use markup for errno
Also remove a .Pp before .Bl while there
2016-12-19 07:48:35 +00:00
christos a25476cdad PR/50506: Tobias Nygren: kqueue(2) lacks EV_DISPATCH/EV_RECEIPT support 2015-12-08 14:52:06 +00:00
christos 6998697823 say that we put the exit code in data. 2015-03-02 19:24:19 +00:00
christos 33b3ee33ee mention that kevent returns now EOPNOTSUPP. 2012-11-24 15:16:52 +00:00
christos 5418d2a724 As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
2012-01-25 00:28:35 +00:00
christos e2bebf7172 * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.
2011-06-26 16:42:39 +00:00
ryo 52e6dde2a6 fix incorrect variable name 2011-05-24 02:31:11 +00:00
wiz 957fbddadb Uncomment pdf link for paper. 2010-04-13 10:45:46 +00:00
jruoho 175f8fdaa8 Add the USENIX paper of Jonathan Lemon to SEE ALSO. 2010-04-13 09:24:09 +00:00
joerg 1c3412fa2f Use .In for header files instead of .Ar Pa and variations. 2010-03-22 19:30:53 +00:00
mbalmer ca310c45c1 remove one the to much. 2009-11-22 18:05:50 +00:00
christos 9d8aeaab57 simplify the example; only register the set of events to watch once since
it does not change. Also print that ATTR means changing times too.
2009-10-24 17:49:58 +00:00
wiz 9e5519cfe8 Make HTML-ready. 2009-09-01 22:12:05 +00:00
elad 8fbf70d4eb Add useful example program from
http://mail-index.netbsd.org/tech-kern/2009/09/01/msg006020.html
2009-09-01 22:01:48 +00:00
wiz 9f5b355274 Use comments instead of .ig (requested by joerg).
Sort errors while here.
2009-03-12 10:16:37 +00:00
ad 07a1846337 Remove pointless AUTHORS sections. The names are in the source and CVS
history along with everyone else who has contributed.
2009-02-25 20:50:16 +00:00
wiz 1339a7549f Make HTML-output safe. 2006-10-13 20:58:50 +00:00
augustss af68367011 Reference kfilter_register(9) rather than the non-existent kfilter_register(2). 2003-12-09 19:49:53 +00:00
wiz 472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
tron c05c218b69 After "sys/event.h" was fixed "sys/types.h" doesn't need to be included
manually any more.
2003-02-16 09:52:40 +00:00
jdolecek d644334729 update copyright dates and .Dd 2003-02-04 09:07:20 +00:00
jdolecek ebec5a4dfb Introduce EVFILT_TIMER, which allows a process to establish an
arbitrary number of timers, both oneshot and periodic.

from FreeBSD
2003-02-04 09:05:42 +00:00
jdolecek 3d8d8663b9 g/c the NEXTRELEASE comment tag now that the next version number is decided 2003-01-19 20:12:31 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
jdolecek 3d73192560 struct kevent's udata is actually intptr_t 2002-11-04 22:14:46 +00:00
jdolecek abf732873b update HISTORY - kqueue branch was merged
bump date
2002-10-23 09:35:24 +00:00