Annotation of researchv9/jerq/include/jerqproc.h, revision 1.1

1.1     ! root        1: #include <tty.h>
        !             2: 
        !             3: extern int     NPROC;
        !             4: #define        STKSIZ  4096
        !             5: #define        CBSIZE  64      /* NPROC*CBSIZE <= queue.h/NCHARS */
        !             6: 
        !             7: #ifndef        QUEUE_H
        !             8: struct cbuf {  /* duplicated from queue.h for simplicity */
        !             9:        struct cbuf *next;
        !            10:        short   word;
        !            11: };
        !            12: struct clist {
        !            13:        struct cbuf *c_tail;
        !            14:        struct cbuf *c_head;
        !            15:        short   c_cc;
        !            16:        short   state;
        !            17: };
        !            18: #endif
        !            19: struct pcb {
        !            20:        int     psw;
        !            21:        char    (*pc)();
        !            22:        int     sp;
        !            23:        int     lower;
        !            24:        int     upper;
        !            25:        int     ap;
        !            26:        int     fp;
        !            27:        int     reg[9];         /* 9 user registers */
        !            28:        int     blkmv;
        !            29: };
        !            30: struct Proc {
        !            31:        struct pcb pcb;
        !            32:        char    *text;
        !            33:        char    *data;
        !            34:        char    *bss;
        !            35:        int     state;
        !            36:        Layer    * layer;
        !            37:        Rectangle rect; /* rectangle on screen */
        !            38:        struct clist kbdqueue;
        !            39:        char    **traploc;
        !            40:        int     *traptype;
        !            41:        int     nticks;
        !            42:        Texture * cursor;
        !            43:        short   inhibited;
        !            44:        short   nchars;
        !            45:        unsigned char   cbuf[CBSIZE*3];         /* circular buffer */
        !            46:        unsigned char   *cbufpin, *cbufpout;
        !            47:        struct ttychars ttychars;               /* chars for tty driver emulation */
        !            48:        int     stack[STKSIZ/sizeof(int)];      /* int for alignment  */
        !            49: };
        !            50: 
        !            51: 
        !            52: #ifndef        MUX_H
        !            53: #      ifdef   TASK_C
        !            54:        struct Proc *newproc();
        !            55: #      else
        !            56:        extern struct Proc *newproc();
        !            57: #      endif
        !            58: extern struct Proc *P;
        !            59: extern struct Proc proctab[];
        !            60: #endif
        !            61: 
        !            62: #ifdef MUXTERM
        !            63: /*
        !            64:  * Data at start of user program
        !            65:  */
        !            66: struct udata {
        !            67:        Rectangle Drect;
        !            68:        Layer    * Jdisplayp;
        !            69:        int     argc;
        !            70:        char    **argv;
        !            71:        struct Mouse mouse;
        !            72: };
        !            73: /* states */
        !            74: #define        RUN             1       /* ready to be scheduled */
        !            75: #define        BUSY            2       /* active */
        !            76: #define        BLOCKED         4       /* blocked by user with ^S */
        !            77: #define        USER            8       /* a user-68ld'd process */
        !            78: #define        KBDLOCAL        16      /* has requested the KBD */
        !            79: #define        MOUSELOCAL      32      /* has requested the MOUSE */
        !            80: #define        GOTMOUSE        64      /* currently owns MOUSE */
        !            81: #define        WAKEUP          128     /* tell CONTROL to issue setrun(p) */
        !            82: #define        MOVED           256     /* layer got moved */
        !            83: #define        UNBLOCKED       512     /* Has been unblocked */
        !            84: #define        ZOMBIE          1024    /* proc died horribly; waiting for debugger */
        !            85: #define        RESHAPED        2048    /* layer got reshaped */
        !            86: #define        ZOMBOOT         4096    /* put in ZOMBIE state after booting */
        !            87: #define        ALARMREQD       8192    /* has requested an alarm */    
        !            88: 
        !            89: #define        setrun(p)       ((p)->state|=RUN)
        !            90: #define        setnorun(p)     ((p)->state&=~RUN)
        !            91: 
        !            92: #else
        !            93: #define        MOVED           256     /* layer got moved */
        !            94: #define        RESHAPED        2048    /* layer got reshaped */
        !            95: #endif MUXTERM

unix.superglobalmegacorp.com

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