Add a new type of syscall "EXTERN" which is meant for modules that live

outside the tree (in pkgsrc). Use it to define afssys (210) which has
been reserved for years, and make it autoload the "openafs" module.
This commit is contained in:
christos 2012-05-05 19:37:37 +00:00
parent 269014127a
commit fae991ec2f
3 changed files with 15 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_syscall.c,v 1.6 2012/03/08 21:59:30 joerg Exp $ */
/* $NetBSD: kern_syscall.c,v 1.7 2012/05/05 19:37:37 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.6 2012/03/08 21:59:30 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.7 2012/05/05 19:37:37 christos Exp $");
#include "opt_modular.h"
@ -194,6 +194,7 @@ sys_nomodule(struct lwp *l, const void *v, register_t *retval)
{ SYS__ksem_destroy, "ksem" },
{ SYS__ksem_timedwait, "ksem" },
{ SYS_nfssvc, "nfsserver" },
{ SYS_afssys, "openafs" },
};
const struct sysent *sy;
const struct emul *em;

View File

@ -1,5 +1,5 @@
#! /bin/sh -
# $NetBSD: makesyscalls.sh,v 1.119 2011/06/26 16:42:42 christos Exp $
# $NetBSD: makesyscalls.sh,v 1.120 2012/05/05 19:37:37 christos Exp $
#
# Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
# All rights reserved.
@ -725,7 +725,7 @@ function putent(type, compatwrap) {
# output a prototype, to be used to generate lint stubs in
# libc.
printproto("")
} else if (type == "COMPAT") {
} else if (type == "COMPAT" || type == "EXTERN") {
# Just define the syscall number with a comment. These
# may be used by compatibility stubs in libc.
printproto(compatwrap_)
@ -880,6 +880,12 @@ $2 == "OBSOL" || $2 == "UNIMPL" || $2 == "EXCL" || $2 == "IGNORED" {
syscall++
next
}
$2 == "EXTERN" {
parseline()
putent("EXTERN", "")
syscall++
next
}
{
for (i = 1; i <= ncompat; i++) {
if ($2 == compat_upper[i]) {

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp $
$NetBSD: syscalls.master,v 1.259 2012/05/05 19:37:37 christos Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@ -26,6 +26,7 @@
; INDIR included, but don't define the syscall args structure,
; and allow it to be "really" varargs.
; NOERR included, syscall does not set errno
; EXTERN implemented, but as 3rd party module
;
; arguments:
; PAD argument not part of the C interface, used only for padding
@ -403,7 +404,8 @@
;
; Syscalls 210-219 are reserved for dynamically loaded syscalls
;
210 UNIMPL
210 EXTERN MODULAR { int|sys||afssys(long id, long a1, long a2, \
long a3, long a4, long a5, long a6); }
211 UNIMPL
212 UNIMPL
213 UNIMPL