Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Add a new type of syscall "EXTERN" which is meant f...



details:   https://anonhg.NetBSD.org/src/rev/6d655ccd4be4
branches:  trunk
changeset: 779129:6d655ccd4be4
user:      christos <christos%NetBSD.org@localhost>
date:      Sat May 05 19:37:37 2012 +0000

description:
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.

diffstat:

 sys/kern/kern_syscall.c  |   5 +++--
 sys/kern/makesyscalls.sh |  10 ++++++++--
 sys/kern/syscalls.master |   6 ++++--
 3 files changed, 15 insertions(+), 6 deletions(-)

diffs (85 lines):

diff -r 1dc0b26ccfa7 -r 6d655ccd4be4 sys/kern/kern_syscall.c
--- a/sys/kern/kern_syscall.c   Sat May 05 19:15:10 2012 +0000
+++ b/sys/kern/kern_syscall.c   Sat May 05 19:37:37 2012 +0000
@@ -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__ksem_destroy, "ksem" },
            { SYS__ksem_timedwait, "ksem" },
            { SYS_nfssvc, "nfsserver" },
+           { SYS_afssys, "openafs" },
        };
        const struct sysent *sy;
        const struct emul *em;
diff -r 1dc0b26ccfa7 -r 6d655ccd4be4 sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh  Sat May 05 19:15:10 2012 +0000
+++ b/sys/kern/makesyscalls.sh  Sat May 05 19:37:37 2012 +0000
@@ -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 @@
                # 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 @@
        syscall++
        next
 }
+$2 == "EXTERN" {
+       parseline()
+       putent("EXTERN", "")
+       syscall++
+       next
+}
 {
        for (i = 1; i <= ncompat; i++) {
                if ($2 == compat_upper[i]) {
diff -r 1dc0b26ccfa7 -r 6d655ccd4be4 sys/kern/syscalls.master
--- a/sys/kern/syscalls.master  Sat May 05 19:15:10 2012 +0000
+++ b/sys/kern/syscalls.master  Sat May 05 19:37:37 2012 +0000
@@ -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



Home | Main Index | Thread Index | Old Index