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/netiso/xebec/test.trans

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: test.trans,v 1.4 1994/06/29 06:41:18 cgd Exp $ */
    2 
    3 *PROTOCOL test
    4 
    5 *INCLUDE
    6 
    7 {
    8 #include "test_def.h"
    9 }
   10 
   11 *PCB    test_pcbstruct  SYNONYM  P
   12 
   13 *STATES
   14 
   15 STATE_A
   16 STATE_B
   17 STATE_C
   18 ALL_STATES = [STATE_A, STATE_B, STATE_C]
   19 
   20 *EVENTS         { int ev_all; }                 SYNONYM  E
   21 
   22 EV_1    { char *ev1_char; }
   23 EV_2    { int   ev2_int; char ev2_char; }
   24 EV_3
   25 EV_4            { struct blah   *ev4_blahptr; 
   26                           unsigned int  ev4_uint;
   27                           int                   ev4_int; 
   28                         }
   29 
   30 *TRANSITIONS
   31 
   32 SAME                    <==                     [ STATE_A, STATE_B ] [ EV_1, EV_2, EV_3 ]
   33         ( $E.ev_all > 0 )
   34         {
   35                 if( $P.test_state == STATE_A )
   36                         printf("state is STATE_A\n"); 
   37                 else
   38                         printf("state is STATE_B\n"); 
   39                 printf("action first transition\n"); 
   40         }
   41 
   42 ;
   43 STATE_C                 <==                     [ STATE_A, STATE_B ] [ EV_1, EV_2, EV_3 ]
   44         DEFAULT
   45         {
   46                 printf("default - transition 2\n");
   47                 MACRO1( $P.test_pcbfield );
   48         }
   49 ;
   50 
   51 STATE_C                 <==                     [ STATE_A, STATE_B ]    EV_4
   52         ( $$.ev4_blahptr->blahfield & 0x1 )
   53         NULLACTION
   54 ;
   55 
   56 STATE_C                 <==                      ALL_STATES     EV_4
   57         DEFAULT
   58         {
   59                 printf("default - transition 4\n");
   60                 printf("pcb is 0x%x, event is 0x%x \n", $P, $E);
   61                 printf("ev4 values are : blahptr 0x%x uint 0x%x int 0x%x\n",
   62                         $$.ev4_blahptr, $$.ev4_uint, $$.ev4_int);
   63         }
   64 ;

Cache object: f82d304f674c02e395e9995535abb7b9


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