Annotation of coherent/a/usr/include/sys/coherent.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Some useful and miscellaneous things.
                      3:  */
                      4: #ifndef        COHERENT_H
                      5: #define        COHERENT_H      COHERENT_H
                      6: 
                      7: #define         KERNEL
                      8: #include <sys/types.h>
                      9: #include <sys/timeout.h>
                     10: #include <sys/param.h>
                     11: #include <sys/fun.h>
                     12: #include <sys/mmu.h>
                     13: #include <sys/uproc.h>
                     14: #ifdef _I386
                     15: #include <sys/reg.h>
                     16: #else
                     17: #include <sys/machine.h>
                     18: #define v_sleep(a1,a2,a3,a4,a5)                sleep(a1,a2,a3,a4)
                     19: #endif
                     20: 
                     21: #ifdef TRACER
                     22: #include <sys/mwc_coherent.h>
                     23: #else
                     24: #define SET_U_ERROR(errno, msg)        { u.u_error = errno; }
                     25: #define T_HAL(f,c)
                     26: #define T_PIGGY(f,c)
                     27: #define T_VLAD(f,c)
                     28: #define T_CON(f,c)
                     29: #endif /* TRACER */
                     30: 
                     31: #ifdef _I386
                     32: #define CHIRP(ch)              chirp(ch)
                     33: #define _CHIRP(ch, locn)       _chirp(ch, locn)
                     34: #else
                     35: #define CHIRP(ch)
                     36: #define _CHIRP(ch, locn)
                     37: #endif
                     38: 
                     39: /*
                     40:  * Null
                     41:  */
                     42: #ifndef        NULL            /* machine.h doesn't have any ideas */
                     43: #define NULL   0
                     44: #endif
                     45: 
                     46: /*
                     47:  * Storage management functions.
                     48:  */
                     49: extern char            *alloc();
                     50: #define        kalloc(n)       alloc(allkp, n)
                     51: #define kfree(p)       free(p)
                     52: 
                     53: /*
                     54:  * Functions for copying between kernel and segments.
                     55:  */
                     56: #define kscopy(k, s, o, n)     kpcopy(k, s->s_paddr+o, n)
                     57: #define skcopy(s, o, k, n)     pkcopy(s->s_paddr+o, k, n)
                     58: 
                     59: /*
                     60:  * Time of day structure.
                     61:  */
                     62: typedef struct TIME {
                     63:        time_t  t_time;                 /* Time and date */
                     64:        int     t_tick;                 /* Clock ticks into this second */
                     65:        int     t_zone;                 /* Time zone */
                     66:        int     t_dstf;                 /* Daylight saving time used */
                     67: } TIME;
                     68: 
                     69: /*
                     70:  * General global variables.
                     71:  */
                     72: extern int      debflag;               /* General debug flag */
                     73: extern int      batflag;               /* Turn on clock flag */
                     74: extern int      outflag;               /* Device timeouts */
                     75: extern int      ttyflag;               /* Console is present */
                     76: extern int      mactype;               /* Machine type */
                     77: extern unsigned utimer;                /* Unsigned timer */
                     78: extern long     lbolt;                 /* Clock ticks since system startup */
                     79: extern TIM     stimer;                 /* Swap timer */
                     80: extern unsigned msize;                 /* Memory size in K */
                     81: extern unsigned asize;                 /* Alloc size in bytes */
                     82: extern TIME     timer;                 /* Current time */
                     83: extern char     *icodep;               /* Init code start */
                     84: extern int      icodes;                /* Init code size */
                     85: extern dev_t    rootdev;               /* Root device */
                     86: extern dev_t    swapdev;               /* Swap device */
                     87: extern dev_t    pipedev;               /* Pipe device */
                     88: extern paddr_t  corebot;               /* Bottom of core */
                     89: extern paddr_t  coretop;               /* Top of core */
                     90: extern paddr_t  holebot;               /* Bottom of I/O memory */
                     91: extern paddr_t  holetop;               /* Top of I/O memory */
                     92: extern daddr_t  swapbot;               /* Bottom of swap */
                     93: extern daddr_t  swaptop;               /* Top of swap */
                     94: extern paddr_t  clistp;                /* Base of clists */
                     95: extern struct   all *allkp;            /* Alloc space */
                     96: extern int      NSLOT;                 /* Num of loadable driver data slots */
                     97: extern int      slotsz;                /* Size of loadable driver data slot */
                     98: extern int *    slotp;                 /* Loadable driver pids/data space */
                     99: extern int      (*altclk)();           /* hook for polled devices */
                    100: extern UPROC    u;                     /* Current user area. */
                    101: 
                    102: #ifdef _I386
                    103: 
                    104: extern unsigned total_mem;             /* Total physical memory in bytes.  */
                    105: extern SR      blockp;                 /* Base of buffers */
                    106: extern SR      allocp;
                    107: extern int     dev_loaded;
                    108: extern int     DUMP_LIM;
                    109: 
                    110: #else
                    111: 
                    112: extern char     *idatap;               /* Init data start */
                    113: extern int      idatas;                /* Init data size */
                    114: extern paddr_t  blockp;                /* Base of buffers */
                    115: extern int      altsel;                /* for far polling, this is selector */
                    116:                                        /* ... for altclk; for near polling, */
                    117:                                        /* ... this is zero */
                    118: extern int     is_ps;                  /* 1 if running on a PS/2            */ 
                    119: 
                    120: #endif
                    121: #endif /* COHERENT_H */

unix.superglobalmegacorp.com

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