Annotation of researchv9/jerq/sgs/inc/patch.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * static char ID_patch[] = "@(#) patch.h: 1.3 7/23/82";
                      3:  */
                      4: 
                      5: struct plist
                      6: {
                      7:        long blk_cnt;                   /* the number of blocks */
                      8:        union pentry
                      9:        {
                     10:                struct
                     11:                {
                     12:                        long            blk_addr;       /* block address    */
                     13:                        long            blk_size;       /* size of block    */
                     14:                        unsigned short  blk_scnum;      /* section of block */
                     15:                        char            blk_type;       /* type of block    */
                     16:                        char            blk_pad;        /* padding          */
                     17:                } type01;                               /* FREE or OLD FCN  */
                     18:                struct
                     19:                {
                     20:                        long            blk_addr;       /* block address    */
                     21:                        long            blk_ndx;        /* fcn tv index     */
                     22:                        unsigned short  blk_scnum;      /* section of block */
                     23:                        char            blk_type;       /* type of block    */
                     24:                        char            blk_size;       /* size of block    */
                     25:                } type2;                                /* DECF             */
                     26:        } block[1];
                     27: };
                     28: 
                     29: #define PLIST  struct plist
                     30: #define PENTRY union pentry
                     31: 
                     32: #define PLSIZE sizeof(PLIST)
                     33: #define PESIZE sizeof(PENTRY)
                     34: 
                     35: /*
                     36:  * There are three types of patch list items:
                     37:  *
                     38:  *     type0   : a block of FREE, unallocated patch space. This space
                     39:  *                     can be used for overwrites
                     40:  *     type1   : a block of text space belonging to a function which
                     41:  *                     has been replaced. The OLD Function can still
                     42:  *                     be active
                     43:  *     type2   : a DECision Function, currently in use
                     44:  */
                     45: 
                     46: #define FREE_patch     0
                     47: #define OLDF_patch     1
                     48: #define DECF_patch     2
                     49: 
                     50: /*
                     51:  * Specify the number of bytes to leave at the start of any replaced
                     52:  * function, when tv are not being used
                     53:  *
                     54:  * This space holds the explicit branch instruction - a "pseudo tv" -
                     55:  * and must be an integral number of words, to insure proper function
                     56:  * alignment
                     57:  */
                     58: 
                     59: #define BRANCH 8

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.