Official MINIX sources - Automatically replicated from gerrit.minix3.org
Go to file
David van Moolenbroek 910831cb5c PM: generic process event publish/subscribe system
Now that there are services other than PM and VFS that implement
userland system calls directly, these services may need to know about
events related to user processes.  In particular, signal delivery may
have to interrupt blocking system calls, and certain cleanup tasks may
have to be performed after a user process exits.

This patch aims to implement a generic, lasting solution for this
problem, by allowing services to subscribe to "signal delivered"
and/or "process exit" events from PM.  PM publishes such events by
sending messages to its subscribed services, which must then reply an
acknowledgment message.

For now, only the two aforementioned events are implemented, and only
the IPC service makes use of the process event facility.

The new process event publish/subscribe system replaces the previous
VM notify-sig/watch-exit/query-exit system, which was unsound: 1) it
allowed subscription to events from individual processes, and suffered
from fundamental race conditions as a result; 2) it relied on "not too
many" processes making use of the IPC server functionality in order to
avoid loss of notifications.  In addition, it had the "ipc" process
name hardcoded, did not distinguish between signal delivery and exits,
and added a roundtrip to VM for all events from all processes.

Change-Id: I75ebad4bc54e646c6433f473294cb4003b2c3430
2016-01-16 14:04:10 +01:00
bin Import NetBSD ps(1) 2016-01-13 20:32:52 +01:00
common w(1): switch to libkvm 2016-01-13 20:32:50 +01:00
crypto NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
distrib Import NetBSD pagesize(1) 2016-01-13 20:32:55 +01:00
docs Add PTYFS, Unix98 pseudo terminal support 2015-06-23 17:43:46 +00:00
etc PM: generic process event publish/subscribe system 2016-01-16 14:04:10 +01:00
external Rename top(1) to mtop(1), import NetBSD top(1) 2016-01-13 20:32:53 +01:00
games Fix weird flock uses 2016-01-13 20:32:23 +01:00
gnu NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
include Start using sysctl(3) throughout userland 2016-01-13 20:32:45 +01:00
lib Import NetBSD dev_mkdb(8) 2016-01-13 20:32:51 +01:00
libexec Start using sysctl(3) throughout userland 2016-01-13 20:32:45 +01:00
minix PM: generic process event publish/subscribe system 2016-01-16 14:04:10 +01:00
releasetools Add MIB service, sysctl(2) support 2016-01-13 20:32:37 +01:00
sbin Import NetBSD sysctl(8) 2016-01-13 20:32:48 +01:00
share Integrate ASR instrumentation into build system 2016-01-13 20:32:34 +01:00
sys IPC server: NetBSD sync, general improvements 2016-01-16 13:58:47 +01:00
tests NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
tools NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
usr.bin Import NetBSD pagesize(1) 2016-01-13 20:32:55 +01:00
usr.sbin Import NetBSD dev_mkdb(8) 2016-01-13 20:32:51 +01:00
.gitignore gitignore: ignore some more generated files 2012-12-06 13:29:20 +00:00
.gitreview build:update 'git review' config to match gerrit.minix3.org 2014-07-28 17:05:15 +02:00
build.sh NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
Makefile.inc Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00