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/powerpc/ps3/ps3-hv-header.awk

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 # This script generates the PS3 hypervisor call header from a hypervisor
    2 # interface definition file. All lines that do not begin with HVCALL
    3 # or a bare # for comments are copied to the output header so that
    4 # enums, constant, C comments and the like can be passed through into the
    5 # header.
    6 #
    7 # Invoke like so: awk -f ps3-hv-header.awk < ps3-hvcall.master > ps3-hv.h
    8 #
    9 
   10 # $FreeBSD: releng/10.1/sys/powerpc/ps3/ps3-hv-header.awk 217044 2011-01-06 04:12:29Z nwhitehorn $
   11 
   12 !/HVCALL.*/ && (!/#.*/ || /#define.*/ || /#include.*/) {
   13         print($0);
   14 }
   15 
   16 /HVCALL.*/ {
   17         split($5, outs, ",")
   18         if ($4 == "UNUSED")
   19                 split("", ins, ",")
   20         else
   21                 split($4, ins, ",")
   22 
   23         printf("int %s(",$3);
   24         for (i = 1; i <= length(ins); i++) {
   25                 printf("uint64_t %s", ins[i]);
   26                 if (i < length(ins)) printf(", ");
   27         }
   28 
   29         if (length(outs) > 0 && length(ins) > 0)
   30                 printf(", ");
   31 
   32         for (i = 1; i <= length(outs); i++) {
   33                 printf("uint64_t *%s", outs[i]);
   34                 if (i < length(outs)) printf(", ");
   35         }
   36 
   37         if (length(outs) == 0 && length(ins) == 0)
   38                 printf("void");
   39 
   40         printf(");\n");
   41 }
   42         

Cache object: 29a1cd199d65394b12677abd6bf49f96


[ 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.