Received: by mail.netbsd.org (Postfix, from userid 605) id C6A0B14A37F; Fri, 6 Nov 2015 02:26:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5C10714A37E for ; Fri, 6 Nov 2015 02:26:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 1ldFqkoIwuWc for ; Fri, 6 Nov 2015 02:26:42 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id 6DB2614A2E8 for ; Fri, 6 Nov 2015 02:26:42 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id 5756398; Fri, 6 Nov 2015 02:26:42 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Fri, 6 Nov 2015 02:26:42 +0000 From: "Paul Goyette" Subject: CVS commit: src/sys To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20151106022642.5756398@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Paul Goyette" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: pgoyette Date: Fri Nov 6 02:26:42 UTC 2015 Modified Files: src/sys/kern: init_main.c sysv_ipc.c sysv_msg.c sysv_sem.c sysv_shm.c src/sys/sys: msg.h sem.h shm.h Log Message: In sysv_sem.c, defer establishment of exithook so we can initialize the module code from module_init() rather than waiting until after calling exec_init(). Use a RUN_ONCE routine at entry to each sys_sem* syscall to establish the exithook, and no longer KASSERT that the hook has been set before removing it. (A manually loaded module can be unloaded before any syscalls have been invoked.) Remove the conditional calls to the various xxx_init() routines from init_main.c - we now rely on module_init() to handle initialization. Let each sub-component's xxx_init() routine handle its own sysctl sub-tree initialization; this removes another set of #ifdef ugliness. Tested both built-in and loadable versions and verified that atf test kernel/t_sysv passes. To generate a diff of this commit: cvs rdiff -u -r1.472 -r1.473 src/sys/kern/init_main.c cvs rdiff -u -r1.29 -r1.30 src/sys/kern/sysv_ipc.c cvs rdiff -u -r1.69 -r1.70 src/sys/kern/sysv_msg.c cvs rdiff -u -r1.94 -r1.95 src/sys/kern/sysv_sem.c cvs rdiff -u -r1.129 -r1.130 src/sys/kern/sysv_shm.c cvs rdiff -u -r1.25 -r1.26 src/sys/sys/msg.h cvs rdiff -u -r1.31 -r1.32 src/sys/sys/sem.h cvs rdiff -u -r1.50 -r1.51 src/sys/sys/shm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.