The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/port/mksystab

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/rc
    2 
    3 file=/sys/src/libc/9syscall/sys.h
    4 
    5 cat <<'!'
    6 #include "/sys/src/libc/9syscall/sys.h"
    7 
    8 typedef long Syscall(ulong*);
    9 
   10 !
   11 
   12 sed 's/#define[         ]*([A-Z0-9_][A-Z0-9_]*).*/SYS\1/; s/SYSSYSR1/SYSR1/' $file |
   13         tr A-Z a-z |
   14         sed 's/.*/Syscall &;/'
   15 
   16 cat <<'!'
   17 Syscall sysdeath;
   18 
   19 Syscall *systab[]={
   20 !
   21 sam -d $file >[2] /dev/null <<'!'
   22 ,s/#define.([A-Z0-9_]+).*/      [\1]    SYS\1,/g
   23 ,x/SYS[A-Z0-9_]+,/ | tr A-Z a-z
   24 ,x/syssysr1/c/sysr1
   25 ,x/sys_x[0-9]*/c/sysdeath
   26 ,x v/\[......+\]/ s/\]/]        
   27 ,p
   28 !
   29 
   30 cat <<'!'
   31 };
   32 
   33 char *sysctab[]={
   34 !
   35 
   36 sam -d $file >[2] /dev/null <<'!'
   37 ,s/#define.([A-Z0-9_]+).*/      [\1]    "\1",/g
   38 ,x/"[A-Z0-9_]+",/ y/"[A-Z]/ | tr A-Z a-z
   39 ,x/_"/c/"
   40 ,x/Sysr1/c/Running
   41 ,x/Rendezvous/c/Rendez
   42 ,x v/\[......+\]/ s/\]/]        
   43 ,p
   44 !
   45 
   46 cat <<'!'
   47 };
   48 
   49 int nsyscall = (sizeof systab/sizeof systab[0]);
   50 !

Cache object: 680cdf194da381c93b0f8debb239b718


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.